Overview
One of the use cases used to evaluate the [Argus] programming language is that of a banking system.
A bank consists of a number of branches, each with its own branch id. Servers correspond to branches, and bank accounts are logically partitioned based on their branch id. The system supports a number of operations, but the most critical for the purposes of this discussion are the following two:
audit(branches: [BranchId]) -> int, which, given a set of branch IDs as input, should return the branchs' balance, andtransfer(from: Account, to: Account, amount: int) -> (), which transfers the specified amount between thefromandtoaccounts.
There is also a number of "frontends" that connect to the servers, which may either be ATMs submitting deposits and withdrawals, or terminals used by clerks to submit bank operations.
At the very least, the information stored per account needs to include:
- The account's number
- The branch ID this account belongs to
- The account's balance