Skip to content

Requirements analysis

One of the key advantages of NPL is that translating requirements into code is often very straightforward.

Two important subjects to consider when analysing requirements are the states of the process and the interactions, and what follows are examples of what that requirement analysis might look like before proceeding to an implementation.

IOU example

Consider an IOU contract. An IOU is an agreement between two parties within which a lender loans a debtor an amount with terms for repayment to be completed by a specific date.


The following state diagram illustrates the states that an IOU can be in:

    [*] --> Unpaid
    Unpaid --> Forgiven
    Unpaid --> Paid
    state join_state <<join>>
    Paid --> join_state
    Forgiven --> join_state
    join_state --> [*]


Consider the interactions between the parties and the means to pay and even potentially forgive the IOU:

    IOU->>IOU: State: Unpaid
    Lender->>IOU: Provides liquidity
    activate IOU
    IOU->>Debtor: Receives liquidity
    opt Forgive at anytime
            Debtor-->>IOU: Forgives IOU
            IOU-->>IOU: State: Forgiven
    Loop Partial Payment
        IOU->>IOU: Calculate Interest on amount due
        IOU->>Debtor: Collect partial payment + interest
        IOU->>Lender: Repay partial payment + interest
        IOU->>IOU: Update amount due
        opt Nothing due
            IOU-->>IOU: State: Paid
            deactivate IOU


Refer to the IOU example in the language docs for a complete walkthrough of an NPL implementation of the IOU.


Furthermore, with the APIs also defined, we can correlate our NPL with the design and user journeys that, together with the back-end implementation, allows us to build and deploy a fully working system very easily using Noumena's tooling to provision, instantiate, run and manage a productive NPL cloud application.


The requirement analysis described above only scratches the surface of what is necessary in order to build a production system. Other important considerations include:

  • Capacity - in terms of storage, for example
  • Compatibility
  • Reliability and availability
  • Maintainability and manageability
  • Scalability
  • Usability