Difference between revisions of "Developer's Guide"
From CVC4
(→File and directory names) |
(→Source file layout) |
||
Line 27: | Line 27: | ||
===Class header files=== | ===Class header files=== | ||
+ | |||
+ | # A class named ThisIsAClass is guarded by a preprocessor macro __CVC4_THIS_IS_A_CLASS_H. Its definition is in src/include/this_is_a_class.h. | ||
+ | # Everything should be in the CVC4 namespace. | ||
===Class implementation files=== | ===Class implementation files=== | ||
+ | |||
+ | # A class named ThisIsAClass should have its implementation under src/ in this_is_a_class.cpp. | ||
===Imported sources=== | ===Imported sources=== | ||
− | + | # **IMPORTANT:** For imported sources, make sure to add an exclusion to the contrib/update-copyright.pl script so that a CVC4 copyright isn't added. | |
==Source file headers== | ==Source file headers== |
Revision as of 03:21, 17 November 2009
Contents
Source tree layout
- config
- this directory holds m4 macro processor files and bits of the autotools build system
- contrib
- this directory includes maintainer scripts and other things that aren't *directly* part of CVC4
- doc
- documentation
- src
- core
- the core of CVC4: the expression package, the core engines, ...
- include
- most include files (some private include files are also in parser and sat)
- parser
- parsers for supported CVC4 input formats
- sat
- propositional parts of CVC4; these include imported minisat sources
- core
Coding guidelines
File and directory names
- Files should be all lowercase, with CamelCase classes in header files named camel_case.h (and their implementations in camel_case.cpp);
- File extensions .cpp and .h are generally preferred, with .ypp and .lpp for yacc and lex inputs---an exception is made for headers when autotools wants to output parser definitions as (e.g.) pl.hpp;
Source file layout
Class header files
- A class named ThisIsAClass is guarded by a preprocessor macro __CVC4_THIS_IS_A_CLASS_H. Its definition is in src/include/this_is_a_class.h.
- Everything should be in the CVC4 namespace.
Class implementation files
- A class named ThisIsAClass should have its implementation under src/ in this_is_a_class.cpp.
Imported sources
- **IMPORTANT:** For imported sources, make sure to add an exclusion to the contrib/update-copyright.pl script so that a CVC4 copyright isn't added.