Skip to main content
Erschienen in: Artificial Intelligence and Law 3/2022

13.10.2021 | Original Research

Contract as automaton: representing a simple financial agreement in computational form

verfasst von: Mark D. Flood, Oliver R. Goodenough

Erschienen in: Artificial Intelligence and Law | Ausgabe 3/2022

Einloggen

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

We show that the fundamental legal structure of a well-written financial contract follows a state-transition logic that can be formalized mathematically as a finite-state machine (specifically, a deterministic finite automaton or DFA). The automaton defines the states that a financial relationship can be in, such as “default,” “delinquency,” “performing,” etc., and it defines an “alphabet” of events that can trigger state transitions, such as “payment arrives,” “due date passes,” etc. The core of a contract describes the rules by which different sequences of events trigger particular sequences of state transitions in the relationship between the counterparties. By conceptualizing and representing the legal structure of a contract in this way, we expose it to a range of powerful tools and results from the theory of computation. These allow, for example, automated reasoning to determine whether a contract is internally coherent and whether it is complete relative to a particular event alphabet. We illustrate the process by representing a simple loan agreement as an automaton.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Fußnoten
1
There are many excellent textbook treatments of the theory of computation and finite state machines, including Sipser (2006), Kozen (1997), and Rosenberg (2010). For an overview, see the lectures by Simonson (2013).
 
2
Kuhn (2014) surveys numerous “controlled natural languages.” Among these is one form of legalese, namely the “Massachusetts Legislative Drafting Language”.
 
3
The notion of the “happy path” comes from the world of software testing, where it refers to the primary software execution path that provides the core required functionality and does not provide for error handling or other exceptional events. In other words, the happy path is the sequence executed when everything goes as expected (Software Engineering Institute 2009).
 
4
There are several alternative representations with expressiveness equivalent to the deterministic finite automaton (DFA). We discuss tabular, graphical, and regular expression presentations below. In addition, any DFA can be converted to an equivalent nondeterministic finite automaton (NFA), and vice versa, as a programmatic exercise. The NFA representation adds a layer of abstraction, but is typically more compact than the corresponding DFA; see Sipser (2006), section 1.2. More expressive computational models include pushdown automata (Sipser 2006, 109ff) and Turing machines (Sipser 2006, 137ff).
 
5
This is a cosmetic simplification. One could add states to the deterministic finite automaton (DFA) to handle “product events” representing the simultaneous occurrence of two or more default triggers. This would proliferate states in the model, but without adding sophistication beyond that expressible by a DFA.
 
6
To emphasize that this is a DFA, Fig. 2 presents the state-transition diagram again with traditional DFA notation, where, the node labels match the “State” column in Table 2, and the edge labels match the “ID” column in Table 3.
 
7
The Myhill-Nerode property is essentially a non-stochastic equivalent of the first-order Markov property; in other words, a first-order Markov chain is the probabilistic counterpart of a deterministic finite automaton (DFA). In particular, the characteristic memorylessness of a Markov chain also applies here, even though the DFA is a non-random process. For a detailed discussion of the Myhill-Nerode property and its implications, see Rosenberg (2010), especially chapters 4–5.
 
8
Separately, there is a practical challenge of synchronizing distributed state in a contractual relationship. Financial contracts typically specify events to facilitate unilateral verification by any of the parties. For example, “Deliver amount X to bank B on or before date T.” However, contracts will define a messaging protocol, such as a notification-and-cure process, for ambiguous situations where unilateral verification fails for some reason.
 
9
Von der Lieth Gardner (1987, chapter 6) refers to self-transitions as “ineffective events.” Knowing when to ignore events, rather than reject (for example, by triggering a back-office investigation), is an important judgment call for contract drafters and implementers. For example, expiration of the statute of limitations with respect to the obligations of the borrower (event E in Table 3) before delivery of the principal (event F) is a physical impossibility, so there is little point in developing error-handling procedures for this case. On the other hand, multiple occurrences of event F in quick succession would be a plausible clerical error, and a rejection procedure might be appropriate to handle this case.
 
10
For an introduction to regular expressions, see Friedl (2006). For a more technical introduction, see Aho and Ullman (1995, chapter 10). Hopcroft et al. (2001), section 3.3, offer an overview of the Unix syntax for regular expressions. Implementations of regular expression parsers frequently augment the functionality with features such as grouping and backtracking to make them more powerful than “pure” regular languages. We ignore these possible extensions here.
 
11
For an introduction to the translation between deterministic finite automatons (DFAs) and regular expressions, see Sipser (2006), section 1.3. For a deeper discussion, see Rosenberg (2010), especially section 5.2.
 
12
For a more detailed introduction to the state-elimination method, see Hopcroft et al. (2001), section 3.2; or Sipser (2006), pp. 66–76. Hopcroft et al. (2001) describe two general methods for the DFA-to-regular expressions conversion, namely path induction and state elimination. The two methods are equivalent in the sense of producing equivalent regular expressions.
 
13
One might object that, because a deterministic finite automaton’s (DFA) state transition network and its regular expression are generally not unique, the complexity score is arbitrary. This objection is ill-founded, however, because there are programmatic techniques to reduce any DFA to a theoretical minimum state-transition network and standard techniques for representing any given DFA as a regular expression.
 
14
The Basel Committee on Banking Supervision (BCBS) (2013) identifies risk data aggregation as a key challenge for financial institutions. A more recent update notes that “none of the banks are fully compliant with the BCBS 239 principles, as attaining the necessary data architecture and IT infrastructure remains a challenge for many” (BCBS 2020, p. 1).
 
15
Multiple responses to the same event appear to be a contradiction in terms. However, the multiple transitions are not to be taken literally. Instead, the NFA is a modeling abstraction with identical expressiveness to the DFA, but which is typically more concise. See Sipser (2006, chapter 1) for further discussion.
 
16
Turing-completeness is a statement about the expressiveness of a programming language. Roughly, a language is Turing-complete if any computable function can be written in that language. In other words, the language can describe any computation that might performed by the broadest class of computers, known as Turing machines, Most familiar programming languages, such as C++, Java, or Python are Turing-complete.
 
17
The need for adequate specification of the external events and internal logic of a contract is reflected in the broadly recognized principle of Anglo-American law that courts will not grant enforcement to contracts that constitute “agreements to agree.” In Delaware state courts, for instance, “a valid contract exists when (1) the parties intended that the contract would bind them, (2) the terms of the contract are sufficiently definite, and (3) the parties exchange legal consideration.” Osborn ex rel. Osborn v. Kemp, 991 A.2d 1153, 1158 (Del. 2010).
 
18
For an introduction to computational logics and formal semantics, see Huth and Ryan (2004).
 
19
At the implementation level, many contracts will also involve some calculation chores, such as determining precise payment amounts, sorting through holiday calendars and day-count conventions, etc. The streamlined agreement elides these considerations by explicitly stating precise dates and dollar amounts. In general, these sorts of calculations would and should typically be the implementation details of some delegated subsystem.
 
20
Transducers are widely used in control systems, including computer hardware design, and in computational linguistics. The control applications are closer to our case of computable contracts; see Mueller and Paul (2000). There are two general classes of finite-state transducers—Moore machines and Mealy machines—that differ essentially in whether outputs can (Mealy) or cannot (Moore) depend on the input event that triggered the transition. See Moore (1956), and Mealy (1955).
 
21
Computer systems designers worry actively about the problem of state space explosion (i.e., proliferation). See for example Baier and Katoen (2008), especially chapter 2.
 
Literatur
Zurück zum Zitat Aho AV, Ullman JD (1995) Foundations of computer science. Computer Science PressMATH Aho AV, Ullman JD (1995) Foundations of computer science. Computer Science PressMATH
Zurück zum Zitat Allen L (1957) Symbolic logic: a razor-edged tool for drafting and interpreting legal documents. Yale Law J 66:833–879CrossRef Allen L (1957) Symbolic logic: a razor-edged tool for drafting and interpreting legal documents. Yale Law J 66:833–879CrossRef
Zurück zum Zitat Azzopardi S, Pace G, Schapachnik F, Schneider G (2016) Contract automata: an operational view of contracts between interactive parties. Artif Intell Law 24:203–243CrossRef Azzopardi S, Pace G, Schapachnik F, Schneider G (2016) Contract automata: an operational view of contracts between interactive parties. Artif Intell Law 24:203–243CrossRef
Zurück zum Zitat Baier C, Katoen J (2008) Principles of model checking. MIT PressMATH Baier C, Katoen J (2008) Principles of model checking. MIT PressMATH
Zurück zum Zitat Bolton P, Dewatripont M (2005) Contract theory. MIT Press Bolton P, Dewatripont M (2005) Contract theory. MIT Press
Zurück zum Zitat Borselli A (2020) Smart contracts in insurance: a law and futurology perspective. In: Marano P, Noussia K (eds) InsurTech: a legal and regulatory view. AIDA Europe research series on insurance law and regulation, vol 1. Springer Borselli A (2020) Smart contracts in insurance: a law and futurology perspective. In: Marano P, Noussia K (eds) InsurTech: a legal and regulatory view. AIDA Europe research series on insurance law and regulation, vol 1. Springer
Zurück zum Zitat Brammertz W, Akkizidis I, Breymann W, Entin R, Rustmann M (2009) Unified financial analysis: the missing links of finance. Wiley Brammertz W, Akkizidis I, Breymann W, Entin R, Rustmann M (2009) Unified financial analysis: the missing links of finance. Wiley
Zurück zum Zitat Brose MS, Flood MD, Krishna D, Nichols B (2014a) Handbook of financial data and risk information vol I: principles and context. Cambridge University PressCrossRef Brose MS, Flood MD, Krishna D, Nichols B (2014a) Handbook of financial data and risk information vol I: principles and context. Cambridge University PressCrossRef
Zurück zum Zitat Brose MS, Flood MD, Krishna D, Nichols B (2014b) Handbook of Financial data and risk information, vol II software and data. Cambridge University Press, II Brose MS, Flood MD, Krishna D, Nichols B (2014b) Handbook of Financial data and risk information, vol II software and data. Cambridge University Press, II
Zurück zum Zitat Clack C (2018) Smart contract templates: legal semantics and code validation. J Digit Bank 2(4):338–352 Clack C (2018) Smart contract templates: legal semantics and code validation. J Digit Bank 2(4):338–352
Zurück zum Zitat Dimishkovska A (2017) Deontic logic and legal rules. In: Sellers M, Kirste S (eds) Encyclopedia of the philosophy of law and social philosophy. Springer Dimishkovska A (2017) Deontic logic and legal rules. In: Sellers M, Kirste S (eds) Encyclopedia of the philosophy of law and social philosophy. Springer
Zurück zum Zitat Flood M, Mendelowitz A, Nichols W (2013) Monitoring financial stability in a complex world. In: Lemieux V (ed) Financial analysis and risk management: data governance, analytics and life cycle management. Springer, pp 15–46CrossRef Flood M, Mendelowitz A, Nichols W (2013) Monitoring financial stability in a complex world. In: Lemieux V (ed) Financial analysis and risk management: data governance, analytics and life cycle management. Springer, pp 15–46CrossRef
Zurück zum Zitat Foreign Exchange Committee (1997) The 1997 International Foreign Exchange Master Agreement (IFEMA). Technical Report, Federal Reserve Bank of New York. Accessed 12 December 2014. Foreign Exchange Committee (1997) The 1997 International Foreign Exchange Master Agreement (IFEMA). Technical Report, Federal Reserve Bank of New York. Accessed 12 December 2014.
Zurück zum Zitat Friedl JEF (2006) Mastering regular expressions, 3rd edn. O’Reilly Friedl JEF (2006) Mastering regular expressions, 3rd edn. O’Reilly
Zurück zum Zitat Gasarch W (2014) Classifying problems into complexity classes. Adv Comput 95:239–292CrossRef Gasarch W (2014) Classifying problems into complexity classes. Adv Comput 95:239–292CrossRef
Zurück zum Zitat Genesereth M, Chaudhri VK (2020) Introduction to logic programming. Morgan & ClaypoolCrossRef Genesereth M, Chaudhri VK (2020) Introduction to logic programming. Morgan & ClaypoolCrossRef
Zurück zum Zitat Goodenough OR (2020) Integrating smart contracts with the legacy legal system: a US perspective”. In: Cappiello B, Carullo G (eds) Blockchain, law and governance. Springer, pp 191–203 Goodenough OR (2020) Integrating smart contracts with the legacy legal system: a US perspective”. In: Cappiello B, Carullo G (eds) Blockchain, law and governance. Springer, pp 191–203
Zurück zum Zitat Governatori G, Idelberger F, Milosevic Z, Riveret R, Sartor G, Xu X (2018) On legal contracts, imperative and declarative smart contracts, and blockchain systems. Artif Intell Law 26:377–409CrossRef Governatori G, Idelberger F, Milosevic Z, Riveret R, Sartor G, Xu X (2018) On legal contracts, imperative and declarative smart contracts, and blockchain systems. Artif Intell Law 26:377–409CrossRef
Zurück zum Zitat Greenwood R, Scharfstein D (2013) The growth of finance. J Econ Persp 27(2):3–28CrossRef Greenwood R, Scharfstein D (2013) The growth of finance. J Econ Persp 27(2):3–28CrossRef
Zurück zum Zitat Grosof BN, Poon TC (2004) SweetDeal: representing agent contracts with exceptions using semantic web rules, ontologies, and process descriptions. Int J Electron Commer 8(4):61–97CrossRef Grosof BN, Poon TC (2004) SweetDeal: representing agent contracts with exceptions using semantic web rules, ontologies, and process descriptions. Int J Electron Commer 8(4):61–97CrossRef
Zurück zum Zitat Hendershott T, Zhang X, Zhao JL, Zheng Z (2021) FinTech as a game changer. Inf Syst Res 32(1):1–17CrossRef Hendershott T, Zhang X, Zhao JL, Zheng Z (2021) FinTech as a game changer. Inf Syst Res 32(1):1–17CrossRef
Zurück zum Zitat Hopcroft J, Motwani R, Ullman J (2001) Introduction to automata theory, languages, and computation, 2nd edn. PearsonMATH Hopcroft J, Motwani R, Ullman J (2001) Introduction to automata theory, languages, and computation, 2nd edn. PearsonMATH
Zurück zum Zitat Huth M, Ryan M (2004) Logic in computer science: modelling and reasoning about systems, 2nd edn. Cambridge University PressCrossRef Huth M, Ryan M (2004) Logic in computer science: modelling and reasoning about systems, 2nd edn. Cambridge University PressCrossRef
Zurück zum Zitat ISDA (2020) Standardize to digitise. IQ ISDA Q 6(1):1–47 ISDA (2020) Standardize to digitise. IQ ISDA Q 6(1):1–47
Zurück zum Zitat Kuhn T (2014) A survey and classification of controlled natural languages. Comput Linguist 40(1):121–170CrossRef Kuhn T (2014) A survey and classification of controlled natural languages. Comput Linguist 40(1):121–170CrossRef
Zurück zum Zitat Liu Q, Islam B, Governatori G (2021) Towards an efficient rule-based framework for legal reasoning. Knowl-Based Syst 224:1070CrossRef Liu Q, Islam B, Governatori G (2021) Towards an efficient rule-based framework for legal reasoning. Knowl-Based Syst 224:1070CrossRef
Zurück zum Zitat MacLeod WB (2007) Reputations, relationships, and contract enforcement. J Econ Lit 45(3):595–628CrossRef MacLeod WB (2007) Reputations, relationships, and contract enforcement. J Econ Lit 45(3):595–628CrossRef
Zurück zum Zitat Moore EF (1956) Gedanken-experiments on sequential machines. Automata Stud 34:129–153MathSciNet Moore EF (1956) Gedanken-experiments on sequential machines. Automata Stud 34:129–153MathSciNet
Zurück zum Zitat Mueller SM, Paul WJ (2000) Computer architecture complexity and correctness. SpringerCrossRef Mueller SM, Paul WJ (2000) Computer architecture complexity and correctness. SpringerCrossRef
Zurück zum Zitat Navarro PE, Rodriguez JL (2014) Deontic logic and legal systems. Cambridge University PressCrossRef Navarro PE, Rodriguez JL (2014) Deontic logic and legal systems. Cambridge University PressCrossRef
Zurück zum Zitat Prisacariu C, Schneider G (2007) A formal language for electronic contracts. In: Formal methods for open object-based distributed systems. Lecture notes in computer science, vol 4468, pp 174–189 Prisacariu C, Schneider G (2007) A formal language for electronic contracts. In: Formal methods for open object-based distributed systems. Lecture notes in computer science, vol 4468, pp 174–189
Zurück zum Zitat Prisacariu C, Schneider G (2009) CL: an action-based logic for reasoning about contracts. In: Workshop on Logic, Language, Information and Computation (WoLLIC’09). Lecture notes in computer science, vol 5514, pp 335–349 Prisacariu C, Schneider G (2009) CL: an action-based logic for reasoning about contracts. In: Workshop on Logic, Language, Information and Computation (WoLLIC’09). Lecture notes in computer science, vol 5514, pp 335–349
Zurück zum Zitat Rosenberg AL (2010) The pillars of computation theory state, encoding, nondeterminism. SpringerCrossRef Rosenberg AL (2010) The pillars of computation theory state, encoding, nondeterminism. SpringerCrossRef
Zurück zum Zitat Sergot MJ, Sadri F, Kowalski RA, Kriwaczek F, Hammond P, Cory HT (1986) The British nationality act as a logic program. Commun ACM 29(5):370–386CrossRef Sergot MJ, Sadri F, Kowalski RA, Kriwaczek F, Hammond P, Cory HT (1986) The British nationality act as a logic program. Commun ACM 29(5):370–386CrossRef
Zurück zum Zitat Sipser M (2006) Introduction to the theory of computation, 2nd edn. Thompson LearningMATH Sipser M (2006) Introduction to the theory of computation, 2nd edn. Thompson LearningMATH
Zurück zum Zitat Stout LA (2012) The shareholder value myth how putting shareholders first harms investors, corporations, and the public. Berrett-Koehler Stout LA (2012) The shareholder value myth how putting shareholders first harms investors, corporations, and the public. Berrett-Koehler
Zurück zum Zitat Surden H (2012) Computable contracts. UCDL Rev 46:629–639 Surden H (2012) Computable contracts. UCDL Rev 46:629–639
Zurück zum Zitat von der Lieth Gardner A (1987) An artificial intelligence approach to legal reasoning. MIT Press von der Lieth Gardner A (1987) An artificial intelligence approach to legal reasoning. MIT Press
Metadaten
Titel
Contract as automaton: representing a simple financial agreement in computational form
verfasst von
Mark D. Flood
Oliver R. Goodenough
Publikationsdatum
13.10.2021
Verlag
Springer Netherlands
Erschienen in
Artificial Intelligence and Law / Ausgabe 3/2022
Print ISSN: 0924-8463
Elektronische ISSN: 1572-8382
DOI
https://doi.org/10.1007/s10506-021-09300-9

Weitere Artikel der Ausgabe 3/2022

Artificial Intelligence and Law 3/2022 Zur Ausgabe

Premium Partner