gerardo schneider
play

Gerardo Schneider Dept. of Computer Science and Engineering - PowerPoint PPT Presentation

Gerardo Schneider Dept. of Computer Science and Engineering Chalmers | Univ. of Gothenburg gerardo@cse.gu.se http://www.cse.chalmers.se/~gersch/ FMAIL19 Bergen, 2 December 2019 (1) Prop QL Sta c Run me Lib eCon


  1. Gerardo Schneider Dept. of Computer Science and Engineering Chalmers | Univ. of Gothenburg gerardo@cse.gu.se http://www.cse.chalmers.se/~gersch/ FMAIL’19 Bergen, 2 December 2019

  2. (1) Prop� QL� Sta c� Run me� Lib� eCon� AeCon� CNLCon� NLCon� (2) Contract� CNL� to� NL� to� Monitor� Analyzer� FL� CNL� Gener.� Sys� Mon� (3) Sta c� Run me� Counter-� Viola on� Viola on� example� Analyzer� Analyzer� Analyzer� Log� CEx� Normative texts: specifications, requirements, legal contracts, regulations, directives, work descriptions , … 2

  3. (1) Prop� QL� Sta c� Run me� Lib� eCon� AeCon� CNLCon� NLCon� (2) Contract� CNL� to� NL� to� Monitor� Analyzer� FL� CNL� Gener.� Sys� Mon� (3) Sta c� Run me� Counter-� Viola on� Viola on� example� Analyzer� Analyzer� Analyzer� Log� CEx� Many challenges to address before getting a fully working system!  Will mention few of them… 3

  4. Need a ” good ” Develop model checker, query Need a ” good ” logic: Runtime overhead CNL close to NL and property language Distributed monitors real time, no &, Intelligent editor? (decidability issues ,…) cross-references, explicit agents, … NL2CNL: (bottleneck) expressiveness vs automation (1) Prop� QL� Statistic vs grammar Sta c� Run me� (machine learning ?!) Lib� eCon� AeCon� CNLCon� NLCon� (2) Contract� CNL� to� NL� to� Monitor� Analyzer� FL� CNL� Gener.� Sys� Mon� (3) Sta c� Run me� Counter-� Viola on� Viola on� example� Analyzer� Analyzer� Analyzer� Log� CEx� • Contracts with algorithmic ▪ Long and low content: Average, percentages, level witnesses Causality and liability analyis: usage, etc, over a given period of ▪ Identifying are traces enough? (need to time where the keep track of alternatives in the • Needs a rich library with some problem is past) standard procedures • Connection between the abstract • Theory of contracts level description of a contract and • Evolving contracts the system: Script to make the • … connection semi-automatically 4

  5. 5

  6. CLAN: A conflict CL: A formal A (simple) CNL to analyzer language for translate into CL contracts (1) Prop� QL� Sta c� Run me� Lib� eCon� AeCon� CNLCon� NLCon� (2) Contract� CNL� to� NL� to� Monitor� Analyzer� FL� CNL� Gener.� Sys� Mon� (3) Sta c� Run me� Counter-� Viola on� Viola on� example� Analyzer� Analyzer� Analyzer� Log� CEx� Simple monitor extraction algorithm 6 * Cristian Prisacariu et al

  7. A CNL to C-O Diagrams Syntactic and translate into semantic queries C-O Diagrams (1) Prop� QL� Sta c� Run me� Lib� eCon� AeCon� CNLCon� NLCon� (2) Contract� CNL� to� NL� to� Monitor� Analyzer� FL� CNL� Gener.� Sys� Mon� (3) Sta c� Run me� Counter-� Viola on� Viola on� example� Analyzer� Analyzer� Analyzer� Log� CEx� Semi-automatic procedure Contract Verifier (web-based * John Camilleri et al prototype tool) * Enrique Martínez et al 7

  8. 8

  9. CL  A formal language to specify “contracts”  Conditional obligations, prohibitions and permissions over complex actions  CTDs and CTPs After the Client presents a valid ticket ( pt ), the Crew is obliged to check the Client’s passport is 1. OK ( cp ) and then give the boarding pass ( gb ) If the Client shows a boarding pass ( sb ) and the Crew check its validity ( cb ), then the Crew is 2. forbidden to deliver a boarding pass ( gb ). If the Crew delivers a boarding pass it should destroy one of them ( db ). [pt] O(cp . gb) ^ [sb . cb] F O(db) (gb) * Joint work with Cristian Prisacariu (PhD thesis) 9

  10. CL Semantics  Encoding into the modal mu-calculus  Useful to show expressiveness  Kripke-structure semantics  “The” semantics of the language  Trace semantics  Useful for monitoring purposes (useful for CLAN) * Joint work with Cristian Prisacariu (PhD thesis) 10

  11. Conflict Analysis (CLAN) Conflict Analyzer for CL  Obliged and forbidden from performing the same 1. action Permitted and forbidden from performing the 2. same action Obliged to perform two conflicting actions 3. Obliged and permitted to perform two conflicting 4. actions Soundness, completeness,  terminatation Trace semantics  Counterexample  Simulation  [pt] O(cp . gb) ^ [sb . cb] F O(db) (gb) CLAN: Conflict! * Joint work with Stephen Fenech and Gordon Pace 11

  12.  A framework allowing contracts written in Controlled Natural Language (CNL) to be analyzed for conflicts * Joint work with John Camilleri & Krasimir Angelov 12

  13. Key elements  Languages  CNL  CL  Framework  GF  Analyzer  CLAN * Joint work with John Camilleri & Krasimir Angelov 13

  14. 14

  15. * John J. Camilleri et al (2014-2017) * Enrique Martínez et al (2012-2013) 15

  16. The ”Box” Activation Agent Modality Reparation constraint Action Predicates RegIsOpen ( IsDone(.) IsSat(.) R IsViol(.) & ... ) Timing constraints Label Time constraints Clocks associated with Clocks associated with boxes ( t_submit ) actions ( t_app ) 16

  17. Refinement < < Sequence Conjunction Choice 17

  18. 18

  19. Timed Automata Semantics 19

  20. 20

  21. Na t u r a l L a n g u a g e Stanford parser Qu e r y Sy n t a c t i c Qu e r y Se ma n t i c Qu e r y o n i sOb l & a g e n t ( u se r ) E ฀ t < 5 ฀ p 1 . o k acti o n Na t u r a l L a n g u a g e T a b u l a r v i e w s i E xtr C o n ver o n Mod Agent Action a t i T i me d Au t o ma t a Co n t r a c t M o d e l No r ma t i v e an s l O u se r p a y ( NT A) Co n t r a c t <obligation> T r P a d mi n b l o c k <agent>user</agent> <action>pay</action> </obligation> <permission> <agent>admin</agent> ... Co n t r o l l e d Na t u r a l L a n g u a g e ( CNL ) o n s ati SAT / UNSAT + i V e rbal M a t c h i n g c l a u se s c o u n t e r - e x a mp l e * Proof-of-concept prototype: http://remu.grammaticalframework.org/contracts/verifier/ * John J. Camilleri et al 2016 21

  22. • Original input text (top) Different representations of the • Controlled natural language (bottom left) contract model: • C-O Diagram (bottom right) 22

  23. • Visualization of the extracted CNL • Each row indicates a clause (first sentence refined into sub-clauses) • User can post-edit the extracted output before going on to the next step 23

  24. Automatic extraction of actions and actors Syntactic and ” semantic ” queries • Queries • Syntactic (text mining on the internal xml representation) • “Semantic” (timed automata -> UPPAAL) 24

  25. 25

  26. • ” Philosophical ” papers – Joint work with Gordon Pace and Fernando Schapachnik • Contract Automata – Mostly Gordon’s work

  27. 27

  28. WHAT IS THE CONNECTION BETWEEN ”REAL” SMART (LEGAL) CONTRACTS CONTRACTS 28

  29. 29

  30. Today…. Smart Contracts are... NOT NOT smart! contracts! But we would like them to be! 30

  31. Limitations and Open Issues (Challenges) Smart Contracts as Smart Contracts as “Software” “Contracts” (Programs) 31

  32. Smart Contracts as “Contracts” Understanding the Connection with the real underlying contract world • What is the smart contract • No way to ensure certain (program) encoding? transactions are satisfied • What are my rights and • Was the good delivered? responsibilities/obligations? • Blockchain + Off-Chain • Where are they • What are the liabilities? “written”? • Explicit? Where? • Are they enforceable? • What is the legal value? 32

  33. Starting in 2020 33

  34. Language to write Smart Legal Contracts Smart Contract Language Enhanced with high-level code 34

  35. 35

  36. CNL FOR LEGAL CONTRACTS BETWEEN PARTIES (RESOURCE AWARE) SMART CONTRACTS (CONNECTIONS WITH THE LEGAL) BLOCKCHAIN 36

  37. ACKNOWLEDGEMENTS Cristian Prisacariu (PhD thesis) ▪ John Camilleri (PhD thesis) ▪ Enrique Martínez ▪ Gordon Pace ▪ Stephen Fenech, Fernando Schapachnik, Krasimir ▪ Angelov, Emilia Cambronero, Gregorio Díaz, Normunds Gruzitis, Mohammad Reza Haghshenas, Marcel Kyas, Olaf Owe, Gabrielle Paganelli, Anders Ravn ,… 37

  38. ? 38

  39. Gerardo Schneider 39

Recommend


More recommend