Minotaur 0.4.1
Docs for developers
Minotaur style guide for developers

The most important guideline is to be consistent!

  • No line should exceed 80 characters including spaces.
  • Use spaces for indentation. No tabs.
  • All warnings from the compiler must be fixed.

Naming Convention

  • Class names are camel-case with first letter in upper case, e.g. TreeManager and not tree_manager or treeManager.
  • Function names are camel-case with first letter in lower case, e.g. TreeManager::getCandidate, and not get_candidate or GetCandidate.
  • Variable names should be brief.
  • All private and protected variables and functions must end in an underscore, e.g. n_, m_, myvar_, doFun_()

Header Files

  • Header file must have doxygen documentation.
  • Header file must have author, file and brief doxygen tags
  • File name should end in '.h'
  • Members of a class should be declared in the following order:
    1. Constructors
    2. Destructor
    3. public functions in alphabetic order
    4. protected variables in alphabetic order
    5. protected functions in alphabetic order
    6. private variables in alphabetic order
    7. private functions in alphabetic order

Source Files

  • Header file must have author, file and brief doxygen tags
  • File name should end in '.cpp'
  • Members of a class should be defined in the following order:
    1. Constructors
    2. Destructor
    3. All other functions in alphabetic order.

Coding Guidelines

  • All functions should be at most 80 lines including blank lines, and debug messages.
  • All if, for, while etc statements must have { } following them. Don't do
    if (x) ++i;
    Instead do
    if (x) {
      ++i;
    }
  • Do not throw exceptions. We do not know what to do with them.
  • Code in base/ directory should not include any files from interfaces/ solvers/ or engines/ directories

Code Formatting Guidelines

  • Write the code in a file using an editor.
  • Save the file without formatting.
  • Run 'clang-format' using the following command: clang-format –style=file -i file_name.cpp
  • Review the formatted code.
  • Compile, build and run to test its functionality.
  • Commit the file.

Minotaur source code documented by Doxygen 1.9.4 on Fri Apr 25 2025