Krasimir Angelov, John J. Camilleri, Gerardo Schneider
20 January 2012
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.
The following must be installed on your machine:
java
)python
)gf
) with Resource Grammar Librariesrunghc
)Everything you need can be obtained in this zip file.
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
.
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,
AnaCon.py
*.gf
Cl.pgf
clan-gui-1.0.0-clan.jar
ClParser.hs
crossproduct.py
airline*.txt
, internet*.txt
*_dictionary.txt
*_in.xml
*_out.txt