X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8b5379a334016329aaa0dcb20a9c421bc997bff3..75b0f01178737904273c694f6e9d1109bd6f28d2:/doc/doxygen/community_giveback.doc?ds=sidebyside diff --git a/doc/doxygen/community_giveback.doc b/doc/doxygen/community_giveback.doc index 9dabdb04a5..8eee215fbd 100644 --- a/doc/doxygen/community_giveback.doc +++ b/doc/doxygen/community_giveback.doc @@ -122,9 +122,9 @@ C idioms). It would be valuable to replace C idioms with C++ ones: `malloc/free` or `new/delete`; - use `std::function` (or template functionoid arguments) instead of function - pointers. + pointers; -@subsection contributing_todo_exceptions Exceptions +@subsubsection contributing_todo_exceptions Exceptions SimGrid used to implement exceptions in C. This has been replaced with C++ exceptions but some bits of the C exceptions are still remaining: @@ -141,7 +141,13 @@ exceptions but some bits of the C exceptions are still remaining: separate the C++ API and the C API and catch all exceptions before they get ouf of C APIs. -@subsection contributing_todo_futures Additions to the futures +@subsubsection contributing_todo_time Time and duration + +Some support for C++11-style time/duration is implemented (see `chrono.hpp`) +but only available in some (S4U) APIs. It would be nice to add support for +them in the rest of the C++ code. + +@subsubsection contributing_todo_futures Futures - Some features are missing in the Maestro future implementation (`simgrid::kernel::Future`, `simgrid::kernel::Promise`) @@ -161,7 +167,7 @@ exceptions but some bits of the C exceptions are still remaining: @subsection contributing_todo_smpi SMPI -@subsubsection contributing_smpi_split_process +@subsubsection contributing_smpi_split_process Process-based privatization Currently, all the simulated processes live in the same process as the SimGrid simulator. The benefit is that we don't have to do context switches and IPC @@ -232,6 +238,64 @@ Other solutions for this might include: @subsection contributing_todo_mc Model-checker +@subsubsection contributing_todo_mc_state_compare Overhaul the state comparison code + +The state comparison code is quite complicated. It has very long functions and +is programmed mostly using C idioms and is difficult to understanda and debug. +It is in need or an overhaul: + + - cleanup, refactorisation, usage of C++ features. + + - The state comparison code works by infering types of blocks allocated on the + heap by following pointers from known roots (global variables, local + variables). Usually the first type found for a given block is used even if + a better one could be found later. By using a first pass of type inference, + on each snapshot before comparing the states, we might use a better type + information on the different blocks. + + - We might benefit from adding logic for handling some known types. For + example, both `std::string` and `std::vector` have a capacity which might + be larger than the current size of the container. We should might ignore + the corresponding elements when comparing the states and infering the types. + + - Another difficulty in the state comparison code is the detection of + dangling pointers. We cannot easily know if a pointer is dangling and + dangling pointers might lead us to choose the wrong type when infering + heap blocks. We might mitigate this problem by delaying the reallocation of + a freed block until there is no blocks pointing to it anymore using some + sort of basic garbage-collector. + +@subsubsection contributing_todo_state_hashing Hashing the states + +In order to speed up the state comparison an idea was to create a hash of the +state. Only states with the same hash would need to be compared using the +state comparison algorithm. Some information should not be inclueded in the +hash in order to avoid considering different states which would otherwise +would have been considered equal. + +The stated could be indexed by their hash. Currently they are indexed +by the number of processes and the amount of heap currently allocated +(see `DerefAndCompareByNbProcessesAndUsedHeap`). + +Good candidate informations for the state hashing: + + - number of processes; + + - their backtraces (instruction addresses); + + - their current simcall numbers; + + - some simcall arguments (eg. number of elements in a waitany); + + - number of pending communications; + + - etc. + +Some basic infrastructure for this is already in the code (see `mc_hash.cpp`) +but it is currently disabled. + +@subsubsection contributing_todo_mc_separation Separate the model-checker code from libsimgrid + @subsubsection contributing_todo_mc_mced_interface Interface with the model-checked processes The model-checker reads many informations about the model-checked process