Sample Parser for SecPAL Simplified English Grammar Now Available!

Topics: AccessControl, F#, Parser, SecPAL, Security
Aug 26, 2007 at 9:16 PM
One of the great strengths of SecPAL is its unique support for multiple representations of a security policy; XML for interoperability; and a simplified English grammar for human readbility. The SecPAL v1.1 Research Release (available from allows SecPAL assertions to be created using the rich and flexible.NET object model or deserialized from (or serialized into XML) XML according to the SecPAL Schema Specification.

This sample includes a parser that allows SecPAL policies and authorization queries to be specified using a simplified English Grammar and then translated into the SecPAL object model. This allows policies to be specified declaratively in a human readable form. Full source code is included. The parser is written using F# and the Lexx and Yacc tools that accompany F#.

Use this thread as a starting point in case you have any questions / suggestions...

Available from here:
Dec 9, 2008 at 9:20 PM
Hello, I am evaluating SecPAL for possible implementation of an authorization module for a trust management system as part of my PhD research. I am trying to setup the environment and I am getting an error while trying to build the parser. I am copying the output of the command line below. Any help in solving this issue and building the parser will be appreciated.
Build the sample...
compiling to dfas (can take a while...)
117 states
writing output
building tables
computing first function...time: 00:00:00.0991109
building kernels...time: 00:00:00.1091141
building kernel table...time: 00:00:00.0184146
computing lookahead relations...................................................................................................................time: 00:00:00.0665690
building lookahead table...time: 00:00:00.0348494
building action table...time: 00:00:00.0508581
building goto table...time: 00:00:00.0082940
returning tables.
112 states
19 nonterminals
34 terminals
50 productions
#rows in action table: 112

I have SecPAL 1.1, Visual Studio and F# installed. I also tried running the three additional files separately but I get an error when I try to check whether the environment variable was configured correctly. I am sure that I am setting the variable correctly but when I type “fsc /?”, “fslex –help”, “fsyacc –help” on the command line, I get the error saying - '"fsc /?"' is not recognized as an internal or external command, operable program or batch file.

I would appreciate any help in this regard.

Apurva Mohan

Dec 17, 2008 at 2:44 AM
Edited Dec 17, 2008 at 2:45 AM

Unfortunately I think the version of the SecPAL parser that is posted here is not compatible with the latest version of F#. So you can do one of three things.
1. Find the same version of F# that we used. I think it is stated in the docs.
2. If you have the time it would be great if you could update the parser to work with the latest version of F# and I will add you as a contributor and you can post the updates to share with everyone else
3. Or there is a slight chance that I could take a look at this over Christmas - but it is just a slight chance...


Jan 29, 2009 at 5:56 PM
Thanks for the reply. I got involved in other things and could not follow up on that. As I am a newbie in Secpal, I think your solution (1) will be most suitable. I will try to look into solution (2).

I will update you when I make some progress.

thanks again,
Sep 27, 2009 at 9:54 PM

Hi Apurva -

I have posted an update of the parser that works on the latest version of F#. Although, looking at your issue again I think you might just be missing a path statement pointing to the bin directory of your F# implementation... I think the intro docs covered a lot of that stuff. Let me know how you went.