AnaCon framework

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.

Workflow overview

AnaCon system workflow


The following must be installed on your machine:



Everything you need can be obtained in this zip file.

Basic operation

Example file format:

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}

  {the ground crew} open {the check-in desk} # {the ground crew} request {the passenger manifest} ;

To run AnaCon:

./ contract.txt

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

./ dictionary.txt

where dictionary.txt has been automatically generated from a previous invocation of 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

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

Main workflow script
GF grammar files
Compiled GF grammars (Portable Grammar Format)
CLAN analyser
Custom lexer/unlexer
Auxiliary script for generating mutually exclusive actions
airline*.txt, internet*.txt
Case study contract files
Case study dictionary files (generated)
Case study CLAN input files (generated)
Case study CLAN output files (generated)