ckit

ckit is a C front end written in SML that translates C source code into abstract syntax represented as a set of SML datatypes.
Download

ckit Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Dave MacQueen
  • Publisher web site:
  • http://www.smlnj.org/doc/ckit/index.html

ckit Tags


ckit Description

ckit is a C front end written in SML that translates C source code into abstract syntax represented as a set of SML datatypes. ckit is a C front end written in SML that translates C source code (after preprocessing) into abstract syntax represented as a set of SML datatypes. It also provides facilities for extending the C language with additional syntactic constructs, which can be useful for implementing "C-like" domain-specific languages as well as C dialects. Ckit is currently used as the front end for a variety of tools for static analysis of C code and at least one domain-specific language.INSTALLATION:Let CKIT be the directory containing the CKit code.Run SML in directory $CKIT/ast.Execute "CM.make();". This gives you the parser/elaborator.On unpacking the ckit sources, you should see a src directory, a doc directory and a README file (and possibly other directories, depending on the distribution).The src directory contains the following subdirectories:parser/ lexer and parser, parse trees. ast/ abstract syntax trees (Ast), type-checker, pretty-printer. variants/ flags for controlling the parser and type-checker. To build the system, cd to src, run SML/NJ and type- CM.make();To test the parser on "test.c", type- ParseToAst.fileToAst "test.c";This parses and typechecks "test.c" and returns an abstract syntax tree for "test.c". Alternatively, to parse, type-check and then pretty-print "test.c", type- ParseToAst.fileToC "test.c";What's New in This Release:· Reworked size and alignment mechanism to support parameterization (see src/ast/sizes.sml). A utility program (src/c-util/sizes.c) can be used to generate sizes info for a given compiler/platform combination.


ckit Related Software