Open echancrure opened 5 months ago
Would the JSON serialisation useful for you?
Potentially, although it would be far removed from parsing C, I don't have examples of outputs or know how to generate one.
Perhaps "C Intermediate Language" https://people.eecs.berkeley.edu/~necula/cil/ is more what I need.
I am looking to use GOTO-Programs, as hopefully generated by GOTO-CL, as a front-end for my testing tool, and I am wondering what the best way forward is. Looking at two other projects which did, this did not help: 2LS is an offshoot rather than a sperate project, and Pinaka's code is not open-source. My idea would be to parse GOTO-programs in text format into a format suitable for my tool (Prolog clauses). I already have a parser for generic C that I was hoping to reuse on goto-programs.
Here is what I have tried so far using CBMC version 5.95.1 for Windows:
cbmc --show-goto-functions mult.c
(as per the documentation on goto-programs) but:I understand, reading around this repository, that it appears that the preferred way of interacting with CBMC is via API calls, but I think this would be quite harder as an outsider to the CBMC project (as I am a part-time team of one person) than simply parsing simple C from goto-cc output.
I find the idea of using goto-programs as a front end very attractive for C-based tools, but at the moment I don't see how to proceed.
To simplify, I have 2 questions:
I am open to other suggestions for handling the messy world of C.
Many thanks, Dr Chris Meudec http://www.echancrure.eu/