Saturday, January 26, 2008

TeXpertise Needed

The paper Dan and I are writing a paper which contains or will contain: ASN.1, C and Haskell.

1. I've found a site that will generate LaTeX from ASN.1 and it looks pretty good.

2. I've found two things that might help with C

2a. A site which generates LaTeX from C. I don't think it looks particularly good but that could be cause I'm not using it properly.

2b. A LaTeX package which allows you to format C I get lots of errors "Non-PDF special ignored!" with this but it looks better than the LaTeX that (2a) generates.

3. I've no idea what to do about Haskell but I haven't done any research yet.

I thought I could put the the LaTeX and the pdf that pdflatex generates here but now I'm not so sure. Watch this space.

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.