These guidelines apply to any AI coding agent working on this repo. Keep responses concise and focused, and follow the standards below when proposing or making changes.
- Keep answers short and impersonal.
- For change requests, format your reply as follows:
- Describe the solution step-by-step (briefly).
- Group changes by file; use the file path as the header.
- For each file, add a short summary, then a single code block with only the changes.
- Start the code block with four backticks and a language tag.
- First line inside the code block: a comment with the filepath.
- Use a single code block per file; if parts are unchanged, replace with
// ...existing code.... - Avoid heavy formatting; bullet lists are fine.
- Do not repeat large unchanged regions.
- Use C++23 features where appropriate.
- Use standard library features where possible.
- Avoid unnecessary dependencies; prefer the standard library and STL.
- Avoid adding new dependencies unless explicitly requested.
- Prefer
std::overusing namespace std;. - Avoid
#defineunless absolutely necessary. - Use
#pragma oncein headers. - Prefer compile-time checks (
static_assert,constexpr) over runtime checks where possible. - Avoid global variables; prefer passing parameters or using class members.
- For code correctness, refer to the C++ Core Guidelines: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines
- This is a C++ library for PDEVS simulation. For DEVS formalism correctness refer to Zeigler et al. "Theory of Modeling and Simulation" or the papers in
reading/. - Prefer STL algorithms and data structures over custom implementations.
- Prefer standard exceptions; document the exception-safety guarantee (strong, basic, no-throw) per function.
- Prefer descriptive variable and function names.
- Prefer
usingovertypedef. - Mark methods
constwhen appropriate. - Use
noexcepton functions that cannot throw.
- CD-Boost is an original C++11 PDEVS simulator written by Damián Vicino (2013-present) at Carleton University / Université Nice Sophia Antipolis.
- An embedded port (Niyonkuru, 2015) was added and later removed; the desktop simulator is the canonical version.
- CD-Boost is the direct predecessor of the Cadmium PDEVS simulator and the CadmIA IA-DEVS simulator.
- This modernization effort updates the build system to CMake/vcpkg and the C++ standard to C++23, while preserving the PDEVS simulation semantics.
- Respect existing BSD 2-Clause license headers.
- Only add new files when explicitly requested.
- Prefer standard C++23. Use
#pragma oncein headers. - Use RAII,
constexpr, andstatic_assertwhere appropriate; avoid macros when possible. - No
using namespacein headers. Keep includes ordered: standard library, Boost, project; group-separated. - Keep lines ≤ 100 columns. Trim trailing whitespace. End files with a newline.
- Prefer
noexcepton functions that cannot throw; mark methodsconstwhen appropriate. - The project is a header-only library.
- Do not include copyrighted code you do not have rights to.
- Do not suggest unsafe operations or hidden network access.
- Use Catch2 3.x for all tests.
- Each test file compiles as a separate executable linked against
Catch2::Catch2WithMain. - Use
TEST_CASE/SECTIONorSCENARIO/GIVEN/WHEN/THENstyle. - Target high code coverage.
- Align to
.editorconfigand.clang-formatin this repo.