Subject: Re: [Cbor] mailing list or github for cddl (fwd) Carsten Bormann: Re: mailing list or github for cddl

From: Michael Richardson <[email-masked]>
Date: Sat, 08 Oct 2016 21:27:09 -0400

Subject: Re: mailing list or github for cddl
From: Carsten Bormann <[email-masked]>
To: Michael Richardson <[email-masked]>
Cc: "Brian E. Carpenter" <[email-masked]>
Date: Sat, 08 Oct 2016 23:08:47 +0200

Hi Michael,

Michael Richardson wrote:
> I did: "gem install cddl", and I can apparently run it against an extraction
> of the GRASP CDDL. I put the file at:
>    https://gist.github.com/mcr/57be316fdc565354a9df521187a73138
>
> Is there a mailing list or github I can ask questions on?

The [email-masked] mailing list is pretty quiet.

> I could look at Brian's python code, but for the moment, I think it's better
> for the documents if I avoid using the source code.
>
> But, I'm not really sure what is going on here.  I was hoping that the CDDL
> utility would help me understand the translation from the grasp.cddl
> definition to the actual structure of the resulting CDDL, but I don't see the
> link at this point.
>
> obiwan-[unstrung/lib/libgrasp](2.2.1) mcr 10335 %cddl grasp.cddl generate
> [7, 10136900, 2756652087]
>
> obiwan-[unstrung/lib/libgrasp](2.2.1) mcr 10336 %cddl grasp.cddl json-generate
> [
>   0
> ]

Well, [0] is a valid grasp message...  Just not a very interesting one.

Unfortunately, the current version of the CDDL tool can't annotate
numbers.  So, for instance, for the following message:

$ cddl 57be316fdc565354a9df521187a73138/gistfile1.txt  gp
/grasp-message/ [8, 7025801,
 /objective/ [/objective-name/ "decalcifier", 7, 228]]

you'd need to look up the 8 (SYNCH) by yourself.

I hope I can get that limitation fixed at some point...

Apart from the (incomplete) support for annotating instances, the tool
is mainly used for validating and (as you used it) for randomly
generating some.
The latter is rather useful, but it is random...
Adding a repeat count may help:

$ cddl 57be316fdc565354a9df521187a73138/gistfile1.txt  gp 10
/grasp-message/ [6, 15496815, [102, /reason/ "orthotoluidin"]]
/grasp-message/ [6, 2025599, [102]]
/grasp-message/ [6, 11295853, [102]]
/grasp-message/ [9, 3493548, /initiator/ h'539fd268', 3640223346, [],
 /objective/ [/objective-name/ "strenuously", 7, 19, /any/ "Pamirian"],
 /objective/ [/objective-name/ "usucapt", 7, 177],
 /objective/ [/objective-name/ "securiform", 7, 136],
 /objective/ [/objective-name/ "decapodiform", 7, 249, /any/ "spun"]]
/grasp-message/ [0]
/grasp-message/ [0]
/grasp-message/ [4, 2927293,
 /objective/ [/objective-name/ "garavance", 7, 60, /any/ "justiciarship"]]
/grasp-message/ [0]
/grasp-message/ [0]
/grasp-message/ [8, 4239061,
 /objective/ [/objective-name/ "molman", 7, 52, /any/ "Fabrikoid"]]

Need to get annotation of numbers fixed.

Grüße, Carsten

--
]               Never tell me the odds!                 | ipv6 mesh networks [
]   Michael Richardson, Sandelman Software Works        | network architect  [
]     [email-masked]  http://www.sandelman.ca/        |   ruby on rails    [