AnaCon framework

Krasimir Angelov, John J. Camilleri, Gerardo Schneider
20 January 2012

Introduction

AnaCon is a framework where normative texts are written in Controlled Natural Language (CNL) and automatically translated into the formal language CL using the Grammatical Framework (GF). In AnaCon such CL expressions are analysed for normative conflicts by the CLAN tool, which gives counter-examples in cases where conflicts are found. Our framework uses GF to give a CNL version of the counter-example helping the user to identify the conflicts in the original text.

The current version of AnaCon is presented in the paper (submitted):

A Framework for Conflict Analysis of Normative Texts Written in Controlled Natural Language, Krasimir Angelov, John J. Camilleri, and Gerardo Schneider, in The Journal of Logic and Algebraic Programming. Submitted 20 January, 2012.

Workflow overview

AnaCon system workflow

Requirements

The following must be installed on your machine:

Usage

Obtaining

Everything you need can be obtained in this zip file.

Basic operation

Example file format:

[clauses]
if {the flight} leaves {in two hours} then both
   - {the ground crew} must open {the check-in desk}
   - {the ground crew} must request {the passenger manifest}
[/clauses]

[contradictions]
  {the ground crew} open {the check-in desk} # {the ground crew} request {the passenger manifest} ;
[/contradictions]

To run AnaCon:

./AnaCon.py contract.txt

To output a cross product of all possible mutually exclusive actions:

./crossproduct.py dictionary.txt

where dictionary.txt has been automatically generated from a previous invocation of AnaCon.py. Recommend that you use this in conjunction with grep.

Changing

If you make changes to the GF grammar, you will need to recompile with:

gf --make ClEng.gf ClCLAN.gf

This will create/update the Cl.pgf file for you. Changes to the Haskell or Python scripts do not require recompilation,

Files

AnaCon.py
Main workflow script
*.gf
GF grammar files
Cl.pgf
Compiled GF grammars (Portable Grammar Format)
clan-gui-1.0.0-clan.jar
CLAN analyser
ClParser.hs
Custom lexer/unlexer
crossproduct.py
Auxiliary script for generating mutually exclusive actions
airline*.txt, internet*.txt
Case study contract files
*_dictionary.txt
Case study dictionary files (generated)
*_in.xml
Case study CLAN input files (generated)
*_out.txt
Case study CLAN output files (generated)