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)

Tuesday, August 28, 2007

Initial Coverage


dom@heisenberg:~/asn15/asn1> hpc report Main --per-module
-----module ConstrainedType>-----
52% expressions used (1318/2496)
25% boolean coverage (13/51)
30% guards (4/13), 5 always True, 1 always False, 3 unevaluated
23% 'if' conditions (9/38), 3 always True, 10 always False, 16 unevaluated
100% qualifiers (0/0)
46% alternatives used (151/326)
63% local declarations used (67/105)
57% top-level declarations used (74/129)
-----module Language.ASN1>-----
0% expressions used (0/296)
100% boolean coverage (0/0)
100% guards (0/0)
100% 'if' conditions (0/0)
100% qualifiers (0/0)
0% alternatives used (0/27)
0% local declarations used (0/8)
0% top-level declarations used (0/36)
-----module Main>-----
100% expressions used (3/3)
100% boolean coverage (0/0)
100% guards (0/0)
100% 'if' conditions (0/0)
100% qualifiers (0/0)
100% alternatives used (0/0)
100% local declarations used (0/0)
100% top-level declarations used (1/1)
-----module Pretty>-----
0% expressions used (0/942)
0% boolean coverage (0/8)
0% guards (0/5), 5 unevaluated
0% 'if' conditions (0/3), 3 unevaluated
100% qualifiers (0/0)
0% alternatives used (0/111)
0% local declarations used (0/19)
0% top-level declarations used (0/51)
-----module QuickTest>-----
37% expressions used (488/1286)
25% boolean coverage (2/8)
20% guards (1/5), 4 always True
33% 'if' conditions (1/3), 1 always False, 1 unevaluated
100% qualifiers (0/0)
48% alternatives used (62/129)
78% local declarations used (18/23)
33% top-level declarations used (24/71)
-----module UnitTest>-----
35% expressions used (918/2590)
100% boolean coverage (0/0)
100% guards (0/0)
100% 'if' conditions (0/0)
100% qualifiers (0/0)
33% alternatives used (2/6)
70% local declarations used (17/24)
39% top-level declarations used (105/266)