Path: csiph.com!feeder.erje.net!2.us.feeder.erje.net!news.glorb.com!border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Fernando Newsgroups: comp.compilers Subject: Seeking contributors for psyche-c Date: Wed, 9 Nov 2016 07:58:11 -0800 (PST) Organization: Compilers Central Lines: 36 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <16-11-001@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Info: miucha.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="99029"; mail-complaints-to="abuse@iecc.com" Keywords: C, tools, available Posted-Date: 09 Nov 2016 12:28:55 EST X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:1798 Dear guys, I would like to announce an open-source tool that we are developing: psyche-c. It completes missing parts of C programs, so that you can have a fully compilable program. In other words, it does type inference and stub generation for missing functions, performing compilation of incomplete C code. The tool has an online interface, which you can use: http://cuda.dcc.ufmg.br/psyche-c/ For instance, if you feed it with this program, taken from Sedgewick's book: void TCdfsR(Graph G, Edge e) { link t; G->tc[e.v][e.w] = 1; for (t = G->adj[e.w]; t != NULL; t = t->next) if (G->tc[e.v][t->v] == 0) TCdfsR(G, EDGE(e.v, t->v)); } Then psyche-c will give you back these declarations: typedef struct link {int v;struct link* next;}* link ; typedef struct Graph {int** tc;struct link** adj;}* Graph ; typedef struct Edge {int v;int w;} Edge ; struct Edge EDGE (int,int) ; Notice that it reconstructs recursive types that are pretty complicated. We have used psyche-c to reconstruct missing code in the GNU Core Util programs and in all the Sedgewick's examples (on graphs), for instance. Psyche-c is good for code completion, as a helper to debug programs, and even to reduce compilation time. It uses a unification based type-inference engine, and has a few tricks to parse C, even when missing declarations. If you would like to contribute, or just know more about the project, the code is available at https://github.com/ltcmelo/psychec. Regards, Fernando