Gerardo Schneider 1
Gerardo Schneider 1 Gerardo Schneider Software Technology Division - - PowerPoint PPT Presentation
Gerardo Schneider 1 Gerardo Schneider Software Technology Division - - PowerPoint PPT Presentation
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/ SEFM12 School 24-28 Sep 2012
Gerardo Schneider
Software Technology Division Department of Computer Science and Engineering Chalmers | University of Gothenburg
gersch@chalmers.se http://www.cse.chalmers.se/~gersch/
2012
SEFM’12 School 24-28 Sep 2012 Thessaloniki, Greece
Gerardo Schneider 2
Gerardo Schneider 3
- 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
1.
The AnaCon framework
2.
Challenges and future research directions
(1) (2) (3)
!"#$%&'() &*+,-.&) /$+.01&') 23)%") !23) !23)%") 43) !"$%'+5%) /$+.01&') 6"$7%"') 8&$&'9) :#$;,&) <7".+;"$) /$+.01&') =%+;5) <7".+;"$) /$+.01&')
- .+/0"'
(1$/)'
!"#$%& #!"#$%& '#$%& ()$*& "+,&
- '#$%&
#./& "$0& 1$%& 234& 5"&
Gerardo Schneider 4
5 Gerardo Schneider
A framework allowing contracts written in
Controlled Natural Language (CNL) to be analyzed for conflicts
6 Gerardo Schneider
Key elements
Languages
CNL CL
Framework
GF
Analyzer
CLAN
7 Gerardo Schneider
* Joint work with Cristian Prisacariu (PhD thesis)
1.
After the Client presents a valid ticket (pt), the Crew is obliged to check the Client’s passport is OK (cp) and then give the boarding pass (gb)
2.
If the Client shows a boarding pass (sb) and the Crew check its validity (cb), then the Crew is forbidden to deliver a boarding pass (gb). If the Crew delivers a boarding pass it should destroy one
- f them (db).
[pt] O(cp.gb) ^ [sb.cb] FO(db)(gb)
A formal language to specify “contracts”
Conditional obligations, prohibitions and permissions
- ver complex actions
CTDs and CTPs
8 Gerardo Schneider
* Joint work with Cristian Prisacariu (PhD thesis)
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)
9 Gerardo Schneider
* Joint work with Stephen Fenech and Gordon Pace
[pt] O(cp.gb) ^ [sb.cb] FO(db)(gb) CLAN: Conflict!
Conflict Analyzer for CL
1.
Obliged and forbidden from performing the same action
2.
Permitted and forbidden from performing the same action
3.
Obliged to perform two conflicting actions
4.
Obliged and permitted to perform two conflicting actions
Soundness, completeness, terminatation
Trace semantics
Counterexample
Simulation
10 Gerardo Schneider
- Xerox Research Center Grenoble, 1998
- Aarne Ranta (Univ. of Gothenburg)
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)
11 Gerardo Schneider
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}
We follow the Internet recommendation RFC 2119 (for requirement specification)
12 Gerardo Schneider
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}
13 Gerardo Schneider
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
14 Gerardo Schneider
Once the check-in desk is closed, the ground crew is prohibited from issuing any boarding pass or from reopening the check-in desk. 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 }
NL Description CNL version (Input file to AnaCon) 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
15 Gerardo Schneider
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <contract> <clauses> <clause> [b6] (F(a1) ^ F(a4)) </clause> </clauses> <concurrentActions/> <action> b6 # a4</action> <action> b6 # a1</action> <action> a4 # a1</action> </concurrentActions> </contract>
Intermediates files
GF abstract syntax
…
CL formula
txt and xml format
Output of CLAN
Translated back to CNL
16 Gerardo Schneider
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
17 Gerardo Schneider
- K. Angelov, J. Camilleri and G. Schneider. A Framework for Conflict Analysis
- f Normative Texts Written in CNL. Subbmitted to JLAP, 2012
- 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
- A. Ranta: Grammatical Framework: Programming with Multilingual