To install, see the file INSTALL in the src/c-parser
directory.
To use:
- Use the heap CParser that is created by installation
- Import the theory CTranslation
- Load ('install') C files into your theories with the Isar command
install_C_file
.
See docs/ctranslation.pdf
for more information about the options
and C language semantics that this tool provides.
See also the examples in the testfiles directory. For example,
breakcontinue.thy
is a fairly involved demonstration of doing things
the hard way.
The translation tool builds on various open source projects by others.
-
Norbert Schirmer's Simpl language and associated VCG tool.
Sources for this are found in the Simpl/ directory. The code is covered by an LGPL licence.
-
Code from SML/NJ:
- an implementation of binary sets (Binaryset.ML)
- the mllex and mlyacc tools (tools/{mllex,mlyacc})
- command-line option parsing (standalone-parser/GetOpt)
This code is covered by SML/NJ's BSD-ish licence.
-
Code from the mlton compiler:
- regions during lexing and parsing (Region.ML, SourceFile.ML and SourcePos.ML)
This code is governed by a BSD licence.
See http://mlton.org