Gerardo Schneider 1
Gerardo Schneider Software Technology Division Department of Computer Science and Engineering Chalmers | University of Gothenburg gersch@chalmers.se http://www.cse.chalmers.se/~gersch/ SEFM’12 School 24-28 Sep 2012 Thessaloniki, Greece 2012 Gerardo Schneider 2
1. General introduction 2. Background: Deontic Logic 3. The formal language CL (syntax, semantics) 4. Conflict analysis of CL contracts 5. Monitoring contracts 6. Conclusion The AnaCon framework 1. Challenges and future research directions 2. Gerardo Schneider 3
()$*& 5"& (1$/)' -.+/0"' (1) "+,& '#$%& -'#$%& #!"#$%& !"#$%& !"$%'+5%) (2) !23)%") 23)%") 6"$7%"') /$+.01&') 43) !23) 8&$&'9) 234& 1$%& (3) =%+;5) :#$;,&) !"#$%&'() <7".+;"$) <7".+;"$) &*+,-.&) /$+.01&') /$+.01&') /$+.01&') "$0& #./& Gerardo Schneider 4
A framework allowing contracts written in Controlled Natural Language (CNL) to be analyzed for conflicts Gerardo Schneider 5
Key elements Languages CNL CL Framework GF Analyzer CLAN Gerardo Schneider 6
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 OK 1. ( 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) Gerardo Schneider 7
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) Gerardo Schneider 8
Conflict Analyzer for CL Obliged and forbidden from performing the 1. same action Permitted and forbidden from performing the 2. same action Obliged to perform two conflicting actions 3. Obliged and permitted to perform two 4. conflicting 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 Gerardo Schneider 9
A programming language for multilingual grammar applications A special-purpose language for grammars , but not restricted to prog. lang. A functional language , but specialized to grammar writing A natural language processing framework, but based on functional prog. and type theory A categorial grammar formalism, but different and equipped with different tools A logical framework , but equipped with concrete syntax in addition to logic Abstract syntax vs Concrete syntax Abstract defines a system of trees Concrete specifies how trees are realized as strings GF grammars are reversible Linearization (abstract - concrete) and parsing (concrete – abstract) • Xerox Research Center Grenoble, 1998 • Aarne Ranta (Univ. of Gothenburg) Gerardo Schneider 10
We follow the Internet recommendation RFC 2119 (for requirement specification) Actions are abstract names in CL, and represent sentences in NL The ground crew opens the check-in desk subject verb object We have all CL action operators: and, choice, sequences,… In our CNL The verb is important Free text is delimited with { and } {the ground crew} opens {the check-in desk} Gerardo Schneider 11
Obligation {the ground crew} must open {the check-in desk} � shall open � is required to open Permission {the ground crew} may open {…} � it is optional for {the ground crew} to open {…} Prohibition { the ground crew} must not open {…} � {the ground crew} shall not open {…} Reparations {the ground crew} must open {…} otherwise � {the ground crew} must pay {a fine} Gerardo Schneider 12
We use indentation / bullet lists for conjunction ( both ) and choice ( either ) on clauses Both - {the ground crew} must not issue {boarding pass} - {the ground crew} must not reopen {the check-in desk} CNL representation for most of CL terms Gerardo Schneider 13
NL Description Once the check-in desk is closed, the ground crew is prohibited from issuing any boarding pass or from reopening the check-in desk. CNL version (Input file to AnaCon) if { the ground crew } closes { the check-in desk } then both - {the ground crew } must not issue { boarding pass } - {the ground crew } must not reopen { the check-in desk } AnaCon will generate a “dictionary” b6 : “the ground crew closes the check-in desk” a4 : “the ground crew reopens the check-in desk” It is possible to add mutually exclusive actions b6 # a4 Gerardo Schneider 14
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> Intermediates files <contract> GF abstract syntax <clauses> <clause> … [b6] (F(a1) ^ F(a4)) </clause> CL formula </clauses> <concurrentActions/> txt and xml format <action> b6 # a4</action> Output of CLAN <action> b6 # a1</action> <action> a4 # a1</action> Translated back to CNL </concurrentActions> </contract> Gerardo Schneider 15
Applied to two case studies Airline check-in process [Fenech, Pace & Schneider, 2009] Internet Service Provider (ISP) contract [Pace, Prisacariu & Schneider, 2007] * K. Angelov, J. Camilleri and G. Schneider. A Framework for Conflict Analysis of Normative Texts Written in CNL . Subbmitted to JLAP, 2012 Gerardo Schneider 16
Questions? o K. Angelov, J. Camilleri and G. Schneider. A Framework for Conflict Analysis of Normative Texts Written in CNL . Subbmitted to JLAP, 2012 o S.M. Montazeri, N. Roy, and G. Schneider. From Contracts in Structured English to CL Specifications. In FLACOS'11 , vol 68 of EPTCS , pp 55-69, 2011 o A. Ranta: Grammatical Framework: Programming with Multilingual Grammar , CSLI Publications, Stanford, 2011 (ISBN-10: 1-57586-626-9) Gerardo Schneider 17
Recommend
More recommend