DAP C++ implementation