Saturday, February 2, 2008

Generate C Code for Multiple Types

The next immediate step is to:
  1. Generate C code for multiple ASN.1 type definitions in a module.
  2. Add some unit tests for generating C code so that any future modifications that affect C code generation are caught before a patch is committed.
Probably the steps after that are to:
  1. Automate (script) testing against asn1c.
  2. Add unit tests for e.g. enumerated types and component of types.
  3. Beef up QuickCheck testing.

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.

Saturday, December 8, 2007

Better Coverage in QuickTest IV


-----module QuickTest>-----
74% expressions used (610/821)
0% boolean coverage (0/6)
0% guards (0/5), 4 always True, 1 always False
0% 'if' conditions (0/1), 1 always False
100% qualifiers (0/0)
64% alternatives used (42/65)
93% local declarations used (15/16)
76% top-level declarations used (33/43)

Better Coverage in QuickTest III


-----module QuickTest>-----
57% expressions used (548/952)
0% boolean coverage (0/6)
0% guards (0/5), 4 always True, 1 always False
0% 'if' conditions (0/1), 1 always False
100% qualifiers (0/0)
58% alternatives used (38/65)
50% local declarations used (15/30)
58% top-level declarations used (31/53)

Friday, December 7, 2007

Better Coverage in QuickTest II


-----module QuickTest>-----
69% expressions used (752/1084)
0% boolean coverage (0/6)
0% guards (0/5), 4 always True, 1 always False
0% 'if' conditions (0/1), 1 always False
100% qualifiers (0/0)
58% alternatives used (58/99)
65% local declarations used (15/23)
70% top-level declarations used (46/65)

Better Coverage in QuickTest


-----module QuickTest>-----
64% expressions used (768/1182)
0% boolean coverage (0/6)
0% guards (0/5), 4 always True, 1 always False
0% 'if' conditions (0/1), 1 always False
100% qualifiers (0/0)
57% alternatives used (60/104)
75% local declarations used (15/20)
66% top-level declarations used (46/69)