Hi

I am new to OCaml and CIL, so hopefully I didn't miss anything obvious.
But I spend the last two days trying to solve the problem on my own and
I just can't figure it out.

When trying to write my transformations I have sometimes troubles
finding the correct match patterns because I don't exactly know how the
instruction, statement or function CIL objects corresponding to a given
piece of code look like.

As far as I know there is nothing like Haskell's Show type class in
OCaml, so directly printing an OCaml string representation of a CIL
object seems not to be possible.

So far, the best I have found to dump AST objects is the
plainCilPrinter. But this printer already hides many details of
the structure of CIL objects so I can not always derive the correct
match patterns from that.

The documentation mentions the option "--usecabs" but my version of
cilly (CIL version 1.3.7) does not recognize this option and I couldn't find
a configure option to enable it either. So I don't really know if "parse
the source and print its AST out" actually is what I need. What I do
know is that the --cabsonly option is not what I need.

So, how can I see the CIL AST of a given C code?

And how do you guys come up with the correct match patterns?

greetings

Alex

Attachment: signature.asc
Description: Digital signature

------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages, 
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev 
_______________________________________________
CIL-users mailing list
CIL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cil-users

Reply via email to