MESSAGE
DATE | 2016-11-27 |
FROM | ruben safir
|
SUBJECT | Subject: [Learn] Fwd: Seeking contributors for psyche-c
|
From learn-bounces-at-nylxs.com Sun Nov 27 20:24:59 2016 Return-Path: X-Original-To: archive-at-mrbrklyn.com Delivered-To: archive-at-mrbrklyn.com Received: from www.mrbrklyn.com (www.mrbrklyn.com [96.57.23.82]) by mrbrklyn.com (Postfix) with ESMTP id 5561F16131E; Sun, 27 Nov 2016 20:24:59 -0500 (EST) X-Original-To: learn-at-nylxs.com Delivered-To: learn-at-nylxs.com Received: from [10.0.0.62] (flatbush.mrbrklyn.com [10.0.0.62]) by mrbrklyn.com (Postfix) with ESMTP id 39589160E77 for ; Sun, 27 Nov 2016 20:24:57 -0500 (EST) References: <16-11-001-at-comp.compilers> To: learn-at-nylxs.com From: ruben safir X-Forwarded-Message-Id: <16-11-001-at-comp.compilers> Message-ID: <8ca9f981-d6f5-00c6-d2ed-ace83a3a8cdd-at-mrbrklyn.com> Date: Sun, 27 Nov 2016 20:24:57 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <16-11-001-at-comp.compilers> Subject: [Learn] Fwd: Seeking contributors for psyche-c X-BeenThere: learn-at-nylxs.com X-Mailman-Version: 2.1.17 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: learn-bounces-at-nylxs.com Sender: "Learn"
-------- Forwarded Message -------- Subject: Seeking contributors for psyche-c Date: Wed, 9 Nov 2016 07:58:11 -0800 (PST) From: Fernando Organization: Compilers Central Newsgroups: comp.compilers
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 _______________________________________________ Learn mailing list Learn-at-nylxs.com http://lists.mrbrklyn.com/mailman/listinfo/learn
|
|