<!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>Declarative Smart Contract Testing by Domain Experts</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Kevin J. Purnell</string-name>
          <email>kevin.purnell@hdr.mq.edu.au</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Rolf Schwitter</string-name>
          <email>rolf.schwitter@mq.edu.au</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="editor">
          <string-name>Answer Set Programming, Declarative Language, Legal Logic, Modelling, Ontology, Smart Contract,</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>School of Computing, Macquarie University</institution>
          ,
          <addr-line>Balaclava Rd, Macquarie Park, NSW, 2109</addr-line>
          ,
          <country country="AU">Australia</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>We present a novel approach to testing Answer Set Programs (ASPs) in the context of a system designed to enable a domain expert to write, test and deploy legal smart contracts. Common practice is to use compiled imperative languages to write smart contracts which limits what can be achieved, and provides a clear opportunity for an approach that empowers domain experts. Our system supports the construction of declarative smart contracts by domain experts with the help of a smart user interface that communicates visually and verbally using domain expert level concepts. It captures the ontology and legal logic of a legal document in a model automatically constructed as an ASP program. This paper discusses a complementary approach to testing, achieved by structuring ASP rules and splitting testing into model validation and program verification. Holding ontology information about the application domain allows the approach to be highly automated, so that we achieve automatic discovery of all hypothetical scenarios and exhaustive testing for each rule. Our approach places the domain expert in a tight learning loop where the behaviour of each rule scenario can be understood from the visual and verbal feedback, and rule corrections can be made immediately as required.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        The Smart Document Editor (SDE) is a system designed to enable a domain expert to write,
test and deploy legal smart contracts on an Ethereum blockchain [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. It uses a smart user
interface (UI) and five processes to extend a traditional paper format legal document into a
smart contract where the legal logic is represented as an auto-generated Answer Set Program
(ASP). The five process steps are: 1) ontology discovery; 2) logic modelling; 3) model validation;
4) smart contract creation; and, 5) program verification. This paper describes an approach to
exhaustive testing (steps 3 and 5) by domain experts that complements the ontology discovery
and logic modelling functionality previously developed [
        <xref ref-type="bibr" rid="ref2 ref3 ref4">2, 3, 4</xref>
        ]. It illustrates features using the
‘Will and Testament’ use case from the preceding papers. A declarative program describes what
is required [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], and the purely declarative language we use, ASP, lends itself to a model-based
specification methodology that is executable [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. Use of model based testing processes (model
validation and program verification) with an executable model allows testing to be performed
as a user-mediated simulation.
      </p>
      <p>
        Model validation answers the question: “Are we building the correct product?” [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. For
software models, model validation is the process by which the domain expert who requested
the model, checks if the model correctly reproduces the features and behaviours of the artefacts
being modelled. In the context of our SDE editor, the requesting domain expert is the user; so
a process that displays to this user all the features and exercises all the intended behaviours,
satisfies the definition of model validation. Another requirement is to prove that the model
operates correctly for all possible instantiations. This is straightforward for text data which is
held as strings, but numeric data requires that exceptions like ‘divide by zero’ return ‘undefined’
[
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], so for model validation we auto-populate these input fields with the type name and standard
numeric values respectively. The SDE editor provides feedback to the user visually and via
verbalisation, a feature made easier to achieve because elements of the ASP program have a
formal correspondence with graphics and text. The representations used by the SDE editor also
hold enough information to support a high level of automation which allows model validation to
be reduced to a user-mediated simulation with visual and verbal feedback. Our approach forces
rule-by-rule creation and testing and it limits the possible outcomes per rule to a manageable
number, making exhaustive testing practical.
      </p>
      <p>
        Program verification answers the question: “Are we building the product correctly?” [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. In
the case of the SDE editor, the declarative program has been generated by the domain expert
who created the requirements specification. Splitting the testing efort into model validation
and program verification reduces the efort required to achieve a form of program verification
which is the equivalent of combining system testing and user acceptance testing for imperative
languages. It can be assumed that the model validation process provides a program shown to
work for test data and shown to be able to handle all possible instantiations including no data.
This means that the state space for program verification relative to model validation is reduced
as some input fields are fixed by the addition of facts (see Section 4). Program verification for
the SDE editor looks similar to model validation, except that the scope is now the ASP program
rather than one rule. This all-up test [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] is the most complex aspect of the SDE editor, and likely
constrains what can be programmed with this approach.
      </p>
      <sec id="sec-1-1">
        <title>1.1. Related Research</title>
        <p>
          Literature describing approaches to testing ASP programs usually mention test cases [
          <xref ref-type="bibr" rid="ref10 ref11 ref12">10, 11, 12</xref>
          ],
coverage, assertions and pre- and post-conditions inserted as meta information comments
in ASP code [
          <xref ref-type="bibr" rid="ref13 ref14">13, 14</xref>
          ], often in relation to the integrated development environment ASPIDE
[
          <xref ref-type="bibr" rid="ref11 ref12 ref13 ref15">11, 12, 13, 15</xref>
          ]. A recent paper refines these ideas and presents a programming environment
“ASP-WIDE” that supports Test-Driven Development (TDD) [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ]. These approaches aim for
efective coverage of the state space rather than attempting exhaustive coverage. In contrast, the
SDE system aims for exhaustive coverage by using a subset of ASP and limiting the complexity
of each rule so that testing all possible outcomes is practical. Program expressability is instead
achieved by stacking rules upon each other (see Section 2.2), a form of modularisation that
suits ASP. This ‘divide and conquer’ strategy appears in the literature [
          <xref ref-type="bibr" rid="ref16 ref17">16, 17</xref>
          ], as does work
on testing the small-scope hypothesis [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ]; however, no similar focus on achieving exhaustive
testing through restrictions on coding style have surfaced. Furthermore, a recent paper by
Kholkar [
          <xref ref-type="bibr" rid="ref19">19</xref>
          ] mentions many of the techniques we use but lists automatic generation of model
testing data as future work. Also note that the modularity achieved with #program, #include
[
          <xref ref-type="bibr" rid="ref20">20</xref>
          ] is not related to rule complexity.
        </p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>2. Overview of the Smart Document Editor (SDE)</title>
      <p>
        Traditionally, most legal documents were paper forms filled out and signed by hand, and
this format is retained in the electronic documents used by word processors and document
automation systems [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ]. The SDE editor adds the ability to first understand the closed world
of the legal document, then model and test the embedded logic. The SDE editor takes an
existing legal document and allows it to be incrementally developed into a smart contract [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
This workflow consists of a fixed sequence of steps that can be split into two main phases:
1) machine understanding of the legal document; and, 2) smart contract creation. Machine
understanding of the legal document involves three steps: (i) modelling the ontology (ontology
discovery); (ii) modelling the legal logic (logic modelling); and, (iii) validating that this model
matches the user’s understanding (model validation). Smart contract creation involves two
steps: (i) entering actual data (contract creation); and, (ii) testing that the output is what is
expected (program verification). The final product is the initial legal document completed with
actual information and an embedded ASP program. Contracts that are legally binding and both
human- and machine-readable are known as Ricardian contracts [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ]. This paper discusses the
techniques used for ‘model validation’, and introduces the techniques used for ‘smart contract
creation’ and the subsequent ‘program verification’ step.
      </p>
      <sec id="sec-2-1">
        <title>2.1. SDE Declarative Representations</title>
        <p>
          The features achieved by the SDE editor rely on the ASP representations used, and these are
structured from a subset of ASP and an adjunct grammar [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]. ASP programs are auto-assembled
from only two components; ASPspec and ASPexpression (see Fig. 1) which are auto-generated
under user guidance. ASPspec represents the ontology of the document and consists of a set of
ASP-like strings, while ASPexpression is the set of executable ASP built-in and aggregate atoms.
ASPspec is used to auto-generate ASPatomic (unground), ASPfact (ground) and ASPtest (ground)
atoms (see Fig. 2). ASP rules (ASPrule) and rule heads (ASPanswer) are also auto-generated.
The ASP Subset used by the SDE editor: The ASP subset conforms to the definition of a “extended
logic program” [
          <xref ref-type="bibr" rid="ref23">23</xref>
          ], where rule heads are restricted to classical literals, and terms (SDEterm) are
restricted to safe functional terms with two parameters [
          <xref ref-type="bibr" rid="ref24 ref25">24, 25</xref>
          ]. The functor &lt;termId&gt; specifies
the purpose of the term, while the parameters are data type (placeholderId) and instance (data).
(1.1) SDEterm: &lt;termId&gt;(&lt;placeholderId&gt;,&lt;data&gt;)
The SDE editor allows three literal types (SDEliteral): 1) ASPatomic are representations; 2)
ASPanswer are rule generated; and, 3) ASPexpression are built-ins and aggregations (Fig. 1).
(1.2) SDEliteral: ["not "]["-"]&lt;predicateId&gt;(&lt;one or more SDEterm&gt;)
        </p>
        <p>The Adjunct Grammar: Artefacts being modelled are represented by literals with predicateId
“represent” and auto-generated from ‘ASPspec’ (see Fig. 2).</p>
        <p>Representations (ASPatomic) for artefacts ‘thing’, ‘association’, and ‘event’ are shown below in
EBNF-like syntax (text enclosed by &lt; &gt; are SDEterms):
(2.1) represent(&lt;thingId&gt;,&lt;thingKey&gt;[,&lt;zero or more properties&gt;])
(2.2) represent(&lt;assocId&gt;,&lt;attribute&gt;,&lt;ofKey&gt;,&lt;toKey&gt;[,&lt;zero or more properties&gt;])
(2.3) represent(&lt;eventId&gt;,&lt;timeKey&gt;[,&lt;agentKey&gt;],&lt;expnrKey&gt;[,&lt;modfrKey&gt;][,&lt;zero or mor...)
The structure of representations assists verbalisation; for example, the representation for an
‘event’ holds agent and experiencer information corresponding to subject and object in an
English active sentence, while representations for ‘thing’ and ‘association’ verbalise as “there
exists” (see Fig. 5). Other representations are likely required for diferent domains (e.g., fluents).</p>
        <sec id="sec-2-1-1">
          <title>Rule heads (ASPanswer) are positive literals with predicateId “rulehead”:</title>
          <p>(2.4) rulehead(&lt;rulehId&gt;,&lt;object&gt;,if,&lt;one or more SDEterm&gt;)
The rule head has meaning relative to some object (the second term), usually the document
being processed; for example, the object of rule ‘is_witnessed’ is the ‘Will’. The ‘if’ marks the
start of SDEterms copied from body literals and which are grouped by ‘and’. The delimiters ‘if’
and ‘and’ aid verbalisation.</p>
        </sec>
        <sec id="sec-2-1-2">
          <title>Expressions (ASPexpression) are also literals:</title>
          <p>(2.5) &lt;zero or more ASPexpression&gt;
Expressions are always attached to an ASP rule, so they do not need identifiers.</p>
        </sec>
      </sec>
      <sec id="sec-2-2">
        <title>2.2. Discussion of Representation Design Choices</title>
        <p>The design of the representations used by the SDE editor is driven by four factors: 1) ease
of verbalisation; 2) understandability of auto-generated ASP code during construction of a
proof-of-concept system; 3) alignment to artefacts and concepts that can be understood by
domain experts; and, 4) achieving a practical exhaustive testing regime. If solver eficiency is
required, techniques for minimising ASP programs, like moving string data to keyed tables
and using meta-programming techniques may assist. Practical exhaustive testing requires
limitations to the complexity of individual rules, but this does not limit stacking rule upon rule
and transmitting information between rules via answer set atoms. For example; ten rules (m)
with three literals (n) each (plus an extra literal for the linking answer set atom), covers (2 )
or 810 input combinations, yet exhaustively testing this large state space is not intractable.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Overview of SDE Model Validation</title>
      <p>
        An SDE answer set program consists of rules and facts (see Fig. 1). Testing this program can be
achieved by modifying facts, which for the SDE editor are also representations of: 1) things
or people; 2) events that can happen (often to things or people); and, 3) relationships between
things, people and events. These facts (ASPfact) have the same form as rule literals (ASPatomic)
and are generated from the same representation specification (ASPspec) (see Fig. 2). This
allows model test data and test scenarios to be automatically generated by reading rule body
literals. The SDE editor uses a human-in-the-loop (mediated) simulation [
        <xref ref-type="bibr" rid="ref26 ref27">26, 27</xref>
        ] which allows
the domain expert user to observe all the features and behaviours of the model with a minimum
of efort, a good fit for the SDE editor’s intended audience. Techniques used to achieve this
simulation approach are outlined in the following sections.
      </p>
      <sec id="sec-3-1">
        <title>3.1. Principles underlying SDE Model Validation</title>
        <p>To be practical for domain experts, the user interface must communicate legal rather than
technical concepts, and this implies the avoidance of a traditional testing methodology. The
approach we take can be summarised by the following five principles: 1) communicate with the
domain expert user by aligning the language and representations used to concepts understood
by a domain expert; 2) decompose complex objects like rules where possible; 3) automate tasks
like scenario generation where possible; 4) feedback to users via both visual and verbal methods;
and, 5) create and test in a tight learning feedback loop.</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. The Model Validation Process</title>
        <p>The SDE editor automatically assembles ASP rules under user guidance in a build-then-test
rule-by-rule process such that the collection of these rules becomes the ASP program. SDE
editor rules use three types of literal in a rule body; ASPatomic, ASPanswer and ASPexpression
(see Fig. 1). Because facts always match the structure of ASPatomic, model validation test data
(ASPtest) can be auto-generated. To instantiate ASPtest, the type is inserted into the data field for
string data, and predefined numbers are inserted for numeric data, so that the ASPtest generated
represent generalised facts. The system automatically develops model testing scenarios for each
rule by simply reading the body literals of the rule, and executes these scenarios by manipulating
the ASPtest (blue coloured box in Fig. 1). The process is: 1) auto-generate singleton facts;
2) auto-generate the exhaustive set of scenarios; 3) automatically step the user though each
scenario providing visual and verbal feedback; and, 4) allow user control via the selection of
either the “Pass” or the “Fail” button (see Fig. 3).</p>
      </sec>
      <sec id="sec-3-3">
        <title>3.3. User Feedback</title>
        <p>This section illustrates our approach to user feedback during model validation using one of our
use cases, the “Will and Testament”. The three relevant components are displayed in Fig. 3:
1) the lower left pane shows the scenario presentation manager with the currently executing
scenario highlighted (grey box); 2) the upper left pane shows the verbalisation of the relevant
answer set atoms; and, 3) the lower right pane shows a visualisation of the rule (red outline).
1. Scenario Presentation Manager: The scenario presentation manager verbalises all test
scenarios in a scrolling window with the true scenario displayed first. For subsequent scenarios,
our approach changes only one variable at a time relative to the true scenario which is enough
to stop the rule from producing an answer set. The changed variable is verbalised as a diference
to the true solution, which is indicated by the prefix “Dif:”. The user can move to the next
scenario by pressing either the “Pass” or “Fail” button.
2. Verbalisation: Scenarios which produce answer sets verbalise the relevant atoms of the
answer set to communicate that the rule has triggered and why it triggered. Representations
lend themselves to verbalisation (see Section 2.1) and four formal correspondences have been
achieved: 1) an icon corresponds to a text term which corresponds to an ASP representation;
2) a photo corresponds to an instance name which corresponds to an ASP fact; 3) parts of the
graphic for a rule correspond to an English clause which corresponds to an ASP literal; and, 4)
the graphic for a rule corresponds to a complete English conditional sentence which corresponds
to an ASP rule. These correspondences allow both scenario and answer set verbalisations (see
Fig. 3). Furthermore, because the SDE editor holds process state, it is able to verbalise using the
correct tense for a particular stage of processing.
3. Dynamic Visualisation of the Rule: The right pane of Fig. 3 displays the visual representation
of the rule ‘is_executable’. The rule head is represented by the green vertical bar with
‘is_executable’ in small crimson text below. The literals that exist are shown as blue arrows, while
those that do not exist are shown as dotted grey arrows. The arrows originating from small
icons attached to larger icons shown in Fig. 3 are ‘events’. The set of scenarios for ‘is_executable’
(Fig. 3) contains only four members because this rule has only four literals and no constraints
and ASP rules are conjunctions. In the scenario being tested, only the ‘cancel’ event has not
happened (shown as a grey dashed line with text “NOT”), while the events that have happened
are represented by blue arrows. This rule fires because all its conditions are satisfied, which
is indicated by its rule head turning green, and a verbalisation being displayed in the top left
pane of Fig. 3. To test the other scenarios listed in the bottom left pane of Fig. 3, ASPtest is
manipulated to remove positive literals and add negative literals one at a time. In this example,
these scenarios do not fire, so the verbalisation disappears and the rule head turns red. Finally,
rules referenced in a following rule (via ASPanswer) are always set to their “true scenario”
because they have already been tested.
4. Complex Rules: A more complex rule is ‘has_qualifier’ (see Fig. 5) which has six scenarios
with answer sets, and is useful for illustrating the more complex features of the SDE editor
model validation process. To aid orientation, the main rule tree of our use case, the ‘Will and
Testament’ is shown in Fig. 4. The rule ‘has_qualifier’ implements an inclusive disjunction
in the body so that it can identify both beneficiaries that are still alive and beneficiaries that
outlasted the testator by at least 30 days, both of which qualify for a distribution. The method
we use always lists the “true scenario” first and by definition this scenario will always have
an answer set. The concept of “true scenario” is extended to “ideal true scenario” for rules
that have multiple scenarios with answer sets. This distinction allows answer sets produced
with all predicates valued at ‘TRUE’ to be diferentiated from answer sets produced where some
facts do not exist. Automatic generation of the “ideal true scenario” is achieved by reading all
body literals (representations first and then expressions) of the rule and retrieving the matching
ASPtest facts. Each grey line of text (see Fig. 5) of the “ideal true scenario” is a verbalisation of
a body literal, elaborated from the matching fact. The answer set of the scenario with focus in
Fig. 5 verbalises as shown in Fig. 6.
5. Interface Rules: Our design requires the interface rule, ‘will_distribute’ (see Fig. 7) to provide
directions to the blockchain via an interface (not implemented) which generates Ethereum
transactions. The verbalisation provides insight into both the minimum set we use to populate
associations and the predefined numbers inserted for numeric data when ASPtest facts are
auto-generated. The minimum set for an association is 2 of each foreign key being associated; so
in this case 2 beneficiaries have 2 assets allocated between them. The allocation percentages are
set at 30% and 70% for the first asset and 60% and 40% for the second asset, while the value of the
ifrst asset is set to $1,000,000 and $50,000 for the second asset. These numbers are hard coded
into the system and have been chosen to provide both generality and confirmation at a glance
for the domain expert, while also exercising the model adequately. The rule ‘will_distribute’
has only one scenario because the rule body uses only ASPanswer and ASPexpression literals,
and the ASPexpression is an assignment (see subsection 3.4).</p>
      </sec>
      <sec id="sec-3-4">
        <title>3.4. Body Literals in Detail</title>
        <p>
          This section details how the components (literals) in the rule body of an SDE editor rule,
are processed. These are: 1) representations of artefacts (ASPatomic); 2) answer set derived
literals (ASPanswer); 3) comparison expressions; 4) assignment expressions; and, 5) aggregate
expressions. These last three literals (ASPexpression) are similar but behave diferently as
described below.
1. ASPatomic: Artefacts are modelled by representations which are literals (see Section 2.1) and
so are predicates. This means that the value of the rule containing only representations in the
body can be calculated via a truth table and has at most 2 (the power set) input combinations.
However; ASP rule bodies are conjunctions, so all literals have to evaluate to ‘true’ for the rule
to fire, which reduces the number of tests required to the number of literals. The method we
use removes positive literals and adds negative literals one at a time.
2. ASPanswer: ASPanswer are literals derived from answer sets of non-interface rules. Because
of the way the SDE editor stacks rules upon each other and requires rules to be validated
immediately after they are created, ASPanswer encountered as literals in a rule body have
already been tested and can be ignored by setting the test data to the “ideal true scenario”.
3. ASPexpression - Comparison: Testing relational operators follows a similar approach, except
that automatic scenario generation now modifies rather than adds or removes the ASPtest
containing the compared variables. Three scenarios are required to exhaustively test a relational
operator; for example, 1) x &gt; y; 2) x = y; and, 3) x &lt; y. The other operators are tested similarly
and comparison predicates can be both weakly and strongly negated.
4. ASPexpression - Assignment: Common ASP terminology refers to expressions as built-in
atoms. In built-in atoms, the equal symbol (“=”) has two meanings (see [
          <xref ref-type="bibr" rid="ref20">20</xref>
          ] page 26) that depend
on the existence of the left variable. If the left variable exists, the equal symbol is treated as
a relational operator, while if it does not exist, the variable is created and assigned the value
calculated for the right side of the expression (both string and numeric). The SDE editor uses
predefined numbers in ASPtest to provide the user with an indication of how an arithmetic
formula behaves, but leaves most arithmetic testing to the program verification step. The SDE
editor does not allow the use of assigned variables within the generating rule because this
complicates testing, and assignments cannot be weakly negated.
5. ASPexpression - Aggregate: Aggregates are treated in a similar way to assignments; that is,
no specific testing is performed because aggregates manipulate actual data. The predefined
numbers in ASPtest creates aggregate values that indicate aggregate behaviour. Aggregates can
be both weakly and strongly negated, and the use of aggregates; like assignments, is restricted
to the following rule to avoid complicating testing.
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Introduction to SDE Smart Contract Creation</title>
      <p>
        The SDE editor creates smart contracts by adding facts to the validated logic model. This section
provides examples of adding facts (ASPfact) and illustrates the use of instantiation placeholders
(IPH) placed by the earlier ontology step to bind input data [
        <xref ref-type="bibr" rid="ref2 ref3">2, 3</xref>
        ].
      </p>
      <p>Examples of representation specifications (ASPspec) at the model validation step are:
(3.1) represent(thingId(document,""),
thingKey( document_name ,"Will and Testament"),
version( document_version ,"v1.0"), ...)
(3.2) represent(thingId(legalperson,executor),
thingKey( executor_name ,""),
address( executor_address ,""), ...)
An example of an event fact (ASPfact) (derived from (3.2)) after the contract creation step is:
(3.3) represent(thingId(legalperson,executor),
thingKey( executor_name ,"James Stewart"),
address( executor_address ,"Macquarie Road, Springwood"), ...).</p>
      <p>Some event representations are not created by the contract creation step. Example (3.4) is an
event ASPfact generated by the interface between Ethereum and the ASP program by mining:
(3.4) represent(eventId(execute,executor),time( executor_execute_time ,44599),1
agent( executor_name ,"James Stewart"),
experiencer( document_name ,"Will and Testament"), ...).</p>
      <p>The Ethereum transaction which triggers mining and generates (3.4) is placed in the transaction
pool by the executor (not implemented).</p>
      <p>1Date is days since 1/1/1900</p>
    </sec>
    <sec id="sec-5">
      <title>5. Introduction to SDE Program Verification</title>
      <p>This section provides a short description of SDE program verification, as the ideas used are
similar to those used by model validation; in particular, model validation of the interface rule (see
Fig. 4). This process also automatically generates hypothetical scenarios by identifying which
literals and variables change the output; however, the scope is now the entire ASP program.</p>
      <p>Changes which afect Smart Contract Outcomes: By the program verification stage, the logic
model has been validated and some facts added, which fixes the value of some variables and
reduces the state space. After this point, only events can change program outcomes, and these
are: 1) the death of the testator, 2) the execution of the ‘Will’; 3) the death of a beneficiary; 4) a
beneficiary contests the ‘Will’; and, 5) a revaluation of an asset to zero via transaction or oracle.
Aspects previously tested by Model Validation: Model validation tests that the system behaves
as expected for both zero and one or more artefacts of a given type, and similarly for numerical
values of zero, undefined, and non-zero.</p>
      <p>Verbalising all Conditions afecting Smart Contract Outcomes: Because the SDE editor is
targeted at domain experts, it is desirable that a complete verbalisation of the ASP program
be displayed, even for events that have already happened (e.g., witnessing). Some simplifying
techniques make this practical; for example, for rules with one answer set, the verbalisation of
all literals can be replaced one verbalisation of the rule, a form of abstraction. The interface
rule ‘will_distribute’ can now be verbalised in an abbreviated form starting with “document
is witnessed”, and “document is executed”. Rules with more than one answer set still require
verbalisation at the literal level. These can be seen for rule ‘has_qualifier’ in Fig. 5. To further
limit verbalisation length, we show events as overlays; for example, “deceased” is overlayed
on beneficiary “Jack” (see Fig. 10). In summary: 1) for rules with one answer set, abstract
with the rule; 2) for rules with more than one answer set, verbalise the non event literals and
overlay the event literals; 3) for calculated variables like ‘Distribution’ (see Fig. 7), ask for test
case data (white input fields in Fig. 10). Test case data is required for every scenario that has
numeric calculations. This requires the domain expert to prepare independent calculations
before conducting the verification. These input fields require manual calculation and input for
each scenario (see Fig. 10 ... death of ‘Jack’).</p>
      <p>Running the User-Mediated Simulation: The system displays each scenario in sequence pausing
for either a “Pass” or “Fail” to be entered by the domain expert. For a scenario to pass, the
calculated allocations must match the test case data entered. Because of previous testing during
model validation and use of simplifying techniques, the verbalisation of the program conditions
and the list of scenarios generated are both manageable. Again, the SDE editor achieves program
verification in a way that is intuitive and usable by domain experts with the visual and verbal
communication channels working synergistically.</p>
    </sec>
    <sec id="sec-6">
      <title>6. Results, Usability and Future Work</title>
      <p>
        The primary objective of this research was to identify a practical testing approach and user
interface that complemented the understandability, usability and look of the ‘ontology discovery’
and ‘logic modelling’ process steps [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] for domain experts. The key techniques required for this
achievement are demonstrated by a proof-of-concept system [
        <xref ref-type="bibr" rid="ref28">28</xref>
        ] and evidence of usability is
provided by the following description. The first testing step (model validation) allows the user
to exhaustively test individual rules by ctrl+click on the rule head. The system computes and
verbalises all test scenarios then moves the user through each scenario one at a time, visually
displaying how the rule works and verbalising the applicable atoms of the answer set if the
rule fires. Progress to the next scenario requires the user to mark the scenario “Pass” or “Fail”.
Progress to the next rule requires failed scenarios to be corrected. The second testing step
(program verification) functions similarly. The system computes and verbalises all test scenarios
for the entire program, using the simplifying techniques discussed in Section 5. If the interface
rule has numeric calculations, the user is asked to input test cases, but otherwise the process is
similar to model validation. The system will only allow smart contract deployment if no “Fail”
lfags exist for the program. Both validation and verification are simple to use and require a
minimum of training.
      </p>
      <p>Areas requiring further research include: 1) investigate the range of use cases that can be
modelled and tested; 2) investigate the boundaries of program expressability; 3) conduct a user
study to determine usability by domain experts; and, 4) further develop the proof-of-concept
system.</p>
    </sec>
    <sec id="sec-7">
      <title>7. Conclusion</title>
      <p>This paper describes research that has the objective of devising a practical approach to the
testing of ASP programs in the context of declarative smart contracts that can be created,
tested and deployed by domain experts. We have identified and described a practical approach
applicable to the subset of ASP programs that can be generated by the SDE editor, namely the
modelling of legal logic used by amenable legal contracts and other legal/normative documents.
The auto-generation of ASP code by the SDE editor facilitates systematic automated testing
approaches; and, adhering to model based testing methods allows the split into two testing
phases to be exploited to lower complexity at each phase. This allows practical exhaustive
testing without overly restricting what can be expressed by the program. To our knowledge, no
other ASP testing approach achieves exhaustive testing in a practical way.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>G.</given-names>
            <surname>Wood</surname>
          </string-name>
          ,
          <article-title>Ethereum: A secure decentralised generalised transaction ledger</article-title>
          ,
          <source>Ethereum Project Yellow Paper</source>
          (
          <year>2014</year>
          ). URL: https://gavwood.com/paper.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>K.</given-names>
            <surname>Purnell</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Schwitter</surname>
          </string-name>
          , Towards Declarative Smart Contracts,
          <source>in: Proceedings of SDLT</source>
          ,
          <year>2019</year>
          , pp.
          <fpage>18</fpage>
          -
          <lpage>21</lpage>
          . URL: https://symposium-dlt.org/4th/SDLT2019-FinalProceedings.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>K.</given-names>
            <surname>Purnell</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Schwitter</surname>
          </string-name>
          ,
          <article-title>User-defined smart contracts using answer set programming</article-title>
          ,
          <source>AI</source>
          <year>2021</year>
          :
          <article-title>Advances in AI</article-title>
          , LNCS
          <volume>13151</volume>
          (
          <year>2021</year>
          )
          <fpage>291</fpage>
          -
          <lpage>303</lpage>
          . doi:
          <volume>10</volume>
          .1007/978- 3-
          <fpage>030</fpage>
          - 97546- 3_
          <fpage>24</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>K.</given-names>
            <surname>Purnell</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Schwitter</surname>
          </string-name>
          ,
          <article-title>User-Guided Machine Understanding of Legal Documents</article-title>
          ,
          <source>in: Proceedings of JURISIN</source>
          ,
          <year>2021</year>
          . URL: https://nuss.nagoya-u.ac.jp/s/ZtFe8PWatGA77Eo.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>J. W.</given-names>
            <surname>Lloyd</surname>
          </string-name>
          ,
          <article-title>Practical advantages of declarative programming</article-title>
          ,
          <source>in: GULP-PRODE</source>
          ,
          <year>1994</year>
          . URL: https://www.programmazionelogica.it/wp-content/uploads/2015/12/GP1994-I-000-031.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>G.</given-names>
            <surname>Brewka</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Eiter</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Truszczynski</surname>
          </string-name>
          ,
          <source>Answer Set Programming at a Glance</source>
          ,
          <source>Communications of the ACM</source>
          <volume>54</volume>
          (
          <year>2011</year>
          )
          <fpage>92</fpage>
          -
          <lpage>103</lpage>
          . doi:
          <volume>10</volume>
          .1145/2043174.2043195.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>B.</given-names>
            <surname>Boehm</surname>
          </string-name>
          ,
          <source>Verifying and Validating Software Requirements and Design Specifications</source>
          ,
          <source>IEEE Software Journal</source>
          <volume>1</volume>
          (
          <year>1984</year>
          )
          <fpage>75</fpage>
          -
          <lpage>88</lpage>
          . doi:
          <volume>10</volume>
          .1109/MS.
          <year>1984</year>
          .
          <volume>233702</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>V.</given-names>
            <surname>Lifschitz</surname>
          </string-name>
          ,
          <article-title>What is answer set programming?</article-title>
          ,
          <source>in: Proceedings of AAAI</source>
          ,
          <year>2008</year>
          , pp.
          <fpage>1594</fpage>
          -
          <lpage>1597</lpage>
          . URL: https://dl.acm.org/doi/10.5555/1620270.1620340.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>M.</given-names>
            <surname>Sharpe</surname>
          </string-name>
          , Saturn and All-up
          <source>Flight Testing: Saturn History Project</source>
          ,
          <year>1974</year>
          . URL: http://heroicrelics. org/info/all-up/
          <article-title>all-up-flight-testing</article-title>
          .html.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>T.</given-names>
            <surname>Janhunen</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Niemelä</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Oetsch</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Pührer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Tompits</surname>
          </string-name>
          ,
          <article-title>On testing answer-set programs</article-title>
          ,
          <source>in: Proceedings of ECAI</source>
          ,
          <year>2010</year>
          , p.
          <fpage>951</fpage>
          -
          <lpage>956</lpage>
          . doi:
          <volume>10</volume>
          .3233/978-1-
          <fpage>60750</fpage>
          -606-5-951.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>O.</given-names>
            <surname>Febbraro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Leone</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Reale</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Ricca</surname>
          </string-name>
          , Unit Testing in
          <string-name>
            <surname>ASPIDE</surname>
          </string-name>
          ,
          <source>ArXiv</source>
          (
          <year>2011</year>
          ). doi:
          <volume>10</volume>
          .48550/ arXiv.1108.5434.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>O.</given-names>
            <surname>Febbraro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Reale</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Ricca</surname>
          </string-name>
          ,
          <article-title>ASPIDE: Integrated Development Environment for Answer Set Programming</article-title>
          ,
          <source>in: Proceedings of LPNMR</source>
          ,
          <year>2011</year>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>642</fpage>
          -20895-9_
          <fpage>37</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <surname>M. D. Vos</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <string-name>
            <surname>Kisa</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <string-name>
            <surname>Oetsch</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <string-name>
            <surname>Puhrer</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          <string-name>
            <surname>Tompits</surname>
          </string-name>
          ,
          <article-title>Annotating answer-set programs in lana</article-title>
          ,
          <source>Theory and Practice of Logic Programming</source>
          <volume>12</volume>
          (
          <year>2012</year>
          )
          <fpage>619</fpage>
          -
          <lpage>637</lpage>
          . doi:
          <volume>10</volume>
          .1017/S1471068418000327.
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>G.</given-names>
            <surname>Amendola</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Berei</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Ricca</surname>
          </string-name>
          ,
          <article-title>Testing in ASP: Revisited language and programming environment</article-title>
          ,
          <source>in: Proceedings of JELIA</source>
          ,
          <year>2021</year>
          , pp.
          <fpage>362</fpage>
          -
          <lpage>376</lpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>030</fpage>
          -75775-5_
          <fpage>24</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>C.</given-names>
            <surname>Kloimüllner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Oetsch</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Pührer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Tompits</surname>
          </string-name>
          ,
          <article-title>Kara: A system for visualising and visual editing of interpretations for answer-set programs</article-title>
          ,
          <source>in: Proceedings of INAP 2011 and WLP</source>
          ,
          <year>2011</year>
          , pp.
          <fpage>325</fpage>
          -
          <lpage>344</lpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>642</fpage>
          -41524-1_
          <fpage>20</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>P.</given-names>
            <surname>Cabalar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Fandinno</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Lierler</surname>
          </string-name>
          ,
          <article-title>Modular Answer Set Programming as a Formal Specification Language</article-title>
          , TPLP
          <volume>20</volume>
          (
          <year>2020</year>
          )
          <fpage>767</fpage>
          -
          <lpage>782</lpage>
          . doi:
          <volume>10</volume>
          .1017/S1471068420000265.
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>D.</given-names>
            <surname>Desovski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Cukic</surname>
          </string-name>
          ,
          <article-title>A Component-Based Approach to Verification and Validation of Formal Software Models</article-title>
          , volume
          <volume>4615</volume>
          ,
          <year>2007</year>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>540</fpage>
          -74035-3\_5.
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>J.</given-names>
            <surname>Oetsch</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Prischink</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Pührer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Schwengerer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Tompits</surname>
          </string-name>
          ,
          <article-title>On the small-scope hypothesis for testing answer-set programs</article-title>
          ,
          <source>13th International Conference on the Principles of Knowledge Representation and Reasoning</source>
          ,
          <string-name>
            <surname>KR</surname>
          </string-name>
          <year>2012</year>
          (
          <year>2012</year>
          )
          <fpage>43</fpage>
          -
          <lpage>53</lpage>
          . doi:
          <volume>10</volume>
          .5555/3031843.3031849.
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>D.</given-names>
            <surname>Kholkar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Mulpuru</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Kulkarni</surname>
          </string-name>
          ,
          <article-title>Balancing model usability and verifiability with SBVR and answer set programming</article-title>
          ,
          <source>in: Proceedings of MODELS 2018 Workshops (MoDeVVa)</source>
          ,
          <source>CEUR Workshop Proceedings</source>
          ,
          <year>2018</year>
          . URL: http://ceur-ws.
          <source>org/</source>
          Vol-
          <volume>2245</volume>
          /modevva_paper_3.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>M.</given-names>
            <surname>Gebser</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Kaminski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Kaufmann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Lindauer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Ostrowski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Romero</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Schaub</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Thiele</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Wanko</surname>
          </string-name>
          ,
          <source>Potassco User Guide 2.2.0</source>
          ,
          <year>2019</year>
          . URL: https://github.com/potassco/guide/releases/.
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>T.</given-names>
            <surname>Reuters</surname>
          </string-name>
          , HighQ Document Automation,
          <year>2022</year>
          . URL: https://legal.thomsonreuters.com/en/ products/highq/document-automation.
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <surname>I. Grigg</surname>
          </string-name>
          ,
          <article-title>The ricardian contract</article-title>
          ,
          <source>in: Proceedings of First IEEE International Workshop on on Electronic Contracting</source>
          ,
          <year>2004</year>
          ,
          <year>2004</year>
          , pp.
          <fpage>25</fpage>
          -
          <lpage>31</lpage>
          . doi:
          <volume>10</volume>
          .1109/WEC.
          <year>2004</year>
          .
          <volume>1319505</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <given-names>T.</given-names>
            <surname>Eiter</surname>
          </string-name>
          , G. Ianni, T. Krennwallner,
          <article-title>Answer set programming: A primer</article-title>
          ,
          <source>Lecture Notes in Computer Science</source>
          <volume>5689</volume>
          (
          <year>2009</year>
          )
          <fpage>40</fpage>
          -
          <lpage>110</lpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>642</fpage>
          -03754-
          <issue>2</issue>
          _
          <fpage>2</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [24]
          <string-name>
            <given-names>F.</given-names>
            <surname>Calimeri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Faber</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Gebser</surname>
          </string-name>
          , G. Ianni,
          <string-name>
            <given-names>R.</given-names>
            <surname>Kaminski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Krennwallner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Leone</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Maratea</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Ricca</surname>
          </string-name>
          , T. Schaub,
          <article-title>Asp-core-2 input language format</article-title>
          ,
          <source>Theory and Practice of Logic Programming</source>
          <volume>20</volume>
          (
          <year>2019</year>
          )
          <fpage>294</fpage>
          -
          <lpage>309</lpage>
          . doi:
          <volume>10</volume>
          .1017/S1471068419000450.
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          [25]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Lierler</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Lifschitz</surname>
          </string-name>
          ,
          <article-title>One more decidable class of finitely ground programs</article-title>
          , in: P.
          <string-name>
            <surname>M. Hill</surname>
          </string-name>
          , D. S. Warren (Eds.),
          <source>Proceedings of Logic Programming. ICLP 2009</source>
          , Springer Berlin Heidelberg,
          <year>2009</year>
          , pp.
          <fpage>489</fpage>
          -
          <lpage>493</lpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>642</fpage>
          -02846-5\_
          <fpage>40</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          [26]
          <string-name>
            <given-names>I.</given-names>
            <surname>Salik</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Ashurst</surname>
          </string-name>
          , Closed Loop Communication Training in Medical Simulation,
          <source>StatPearls Publishing</source>
          ,
          <year>2021</year>
          . URL: www.statpearls.com/articlelibrary/viewarticle/63796/.
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          [27]
          <string-name>
            <given-names>G. E.</given-names>
            <surname>Paul</surname>
          </string-name>
          ,
          <source>Modeling and Simulation of Human Systems</source>
          , John Wiley &amp; Sons, Ltd,
          <year>2021</year>
          , pp.
          <fpage>704</fpage>
          -
          <lpage>735</lpage>
          . doi:
          <volume>10</volume>
          .1002/9781119636113.ch27.
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          [28]
          <string-name>
            <given-names>K.</given-names>
            <surname>Purnell</surname>
          </string-name>
          , Smart Document Editor Proof-Of-Concept,
          <year>2022</year>
          . URL: http://130.56.246.229/.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>