Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Documentation
authorGabriel Corona <gabriel.corona@loria.fr>
Thu, 21 Jul 2016 09:59:53 +0000 (11:59 +0200)
committerGabriel Corona <gabriel.corona@loria.fr>
Thu, 21 Jul 2016 09:59:53 +0000 (11:59 +0200)
doc/doxygen/uhood.doc
src/mc/Session.hpp

index b1ef22d..be3ce71 100644 (file)
@@ -12,16 +12,16 @@ TBD
 S4U classes are designed to be user process interfaces to Maestro resources.
 We provide an uniform interface to them:
 
 S4U classes are designed to be user process interfaces to Maestro resources.
 We provide an uniform interface to them:
 
-* automatic reference count with intrusive smart pointers `simgrid::s4u::FooPtr`
 (also called `simgrid::s4u::Foo::Ptr`);
+- automatic reference count with intrusive smart pointers `simgrid::s4u::FooPtr`
+ (also called `simgrid::s4u::Foo::Ptr`);
 
 
-* manual reference count with `intrusive_ptr_add_ref(p)`,
+- manual reference count with `intrusive_ptr_add_ref(p)`,
   `intrusive_ptr_release(p)` (which is the interface used by
   [`boost::intrusive_ptr`](http://www.boost.org/doc/libs/1_61_0/libs/smart_ptr/intrusive_ptr.html));
 
   `intrusive_ptr_release(p)` (which is the interface used by
   [`boost::intrusive_ptr`](http://www.boost.org/doc/libs/1_61_0/libs/smart_ptr/intrusive_ptr.html));
 
-* delegation of the operations to a opaque `pimpl` (which is the Maestro object);
+- delegation of the operations to a opaque `pimpl` (which is the Maestro object);
 
 
-* the Maestro object and the corresponding S4U object have the same lifetime
+- the Maestro object and the corresponding S4U object have the same lifetime
   (and share the same reference count).
 
 The ability to manipulate thge objects thought pointers and have the ability
   (and share the same reference count).
 
 The ability to manipulate thge objects thought pointers and have the ability
@@ -38,18 +38,18 @@ corresponding C++ standard classes. For example, the methods of
 `simgrid::s4u::Mutex` are based on [`std::mutex`](http://en.cppreference.com/w/cpp/thread/mutex).
 This has several benefits:
 
 `simgrid::s4u::Mutex` are based on [`std::mutex`](http://en.cppreference.com/w/cpp/thread/mutex).
 This has several benefits:
 
* we use a proven interface with a well defined and documented semantic;
- we use a proven interface with a well defined and documented semantic;
 
 
* the interface is easy to understand and remember for people used to the C++
- the interface is easy to understand and remember for people used to the C++
    standard interface;
 
    standard interface;
 
* we can use some standard C++ algorithms and helper classes with our types
 we can use some standard C++ algorithms and helper classes with our types
    (`simgrid::s4u::Mutex` can be used with
    [`std::lock`](http://en.cppreference.com/w/cpp/thread/lock),
    [`std::unique_lock`](http://en.cppreference.com/w/cpp/thread/unique_lock),
    etc.).
 
    (`simgrid::s4u::Mutex` can be used with
    [`std::lock`](http://en.cppreference.com/w/cpp/thread/lock),
    [`std::unique_lock`](http://en.cppreference.com/w/cpp/thread/unique_lock),
    etc.).
 
-Example of `simgris::s4u::Actor`:
+Example of `simgrid::s4u::Actor`:
 
 ~~~
 class Actor {
 
 ~~~
 class Actor {
index 11afeda..7af4c43 100644 (file)
@@ -60,16 +60,27 @@ public:
 public: // static constructors
 
   /** Create a new session by forking
 public: // static constructors
 
   /** Create a new session by forking
+   *
+   *  This sets up the environment for the model-checked process
+   *  (environoment variables, sockets, etc.).
    *
    *  The code is expected to `exec` the model-checker program.
    */
   static Session* fork(std::function<void(void)> code);
 
    *
    *  The code is expected to `exec` the model-checker program.
    */
   static Session* fork(std::function<void(void)> code);
 
-  /** Create a session using `execv` */
+  /** Spawn a model-checked process
+   *
+   *  @param path full path of the executable
+   *  @param argv arguments for the model-checked process (NULL-terminated)
+   */
   static Session* spawnv(const char *path, char *const argv[]);
 
   static Session* spawnv(const char *path, char *const argv[]);
 
-  /** Create a session using `execvp` */
-  static Session* spawnvp(const char *path, char *const argv[]);
+  /** Spawn a model-checked process (using PATH)
+   *
+   *  @param file file name of the executable (found using `PATH`)
+   *  @param argv arguments for the model-checked process (NULL-terminated)
+   */
+  static Session* spawnvp(const char *file, char *const argv[]);
 };
 
 // Temporary
 };
 
 // Temporary