Sunday, January 20, 2008

Testing Against asn1c in Windows

I've managed to install lcc and compile a program to encode ASN.1 (into XER as it happens) using asn1c. So we should be able to:

  1. Generate random ASN.1 types and values (using the AST and QuickCheck).
  2. Generate 'C' headers for the ASN.1 types using asn1c.
  3. Generate a 'C' program to decode the ASN.1 values.
  4. Compile the 'C' program (this is harder is Windows but lcc seems to do the trick after creating a cut down makefile - I think we will have to generate code to compile each 'C' program that asn1c generates - on Linux, all you have to do is gcc -I. -o test *.c or very nearly).
  5. Run the 'C' program (using Haskell) to encode the ASN.1 values into PER.
  6. Decode the values from PER using Haskell into values which match the ASN.1 types.
on Windows as well as on Linux.

It's not finished yet but I'm nearly there.

No comments: