| > The Program Execution Monitor > Implementation |

### The Program Execution Monitor implementation

To monitor execution of user supplied function cpp_main() the Program Execution Monitor relies on the Boost.Test's Execution Monitor. Also the Program Execution Monitor supplies the function main() to facilitate uniform error reporting. Following files constitute the Program Execution Monitor implementation:

`libs/test/execution_monitor.cpp` | provides Execution Monitor implementation for all supported configurations.
`libs/test/cpp_main.cpp` | supplies function main() for static library build
`boost/test/included/prg_exec_monitor.hpp` | combines all implementation files into single header to be use as inlined version of component
`boost/test/prg_exec_monitor.hpp` | contains definitions for main() function for dynamic library build and pragmas for auto-linking feature support.

The Program Execution Monitor implementation wraps several system headers and is intended to be used as standalone library. While there exist an alternative variant to include the whole implementation directly into your program, for the long term usage the preferable solution is to build library once and reuse it.