Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
simgrid.git
11 months agoForce the use of sleep sets with ODPOR
Maxwell Pirtle [Tue, 30 May 2023 14:11:45 +0000 (16:11 +0200)]
Force the use of sleep sets with ODPOR

11 months agoGitHub action: update to actions/checkout@v3
Martin Quinson [Tue, 30 May 2023 14:06:16 +0000 (16:06 +0200)]
GitHub action: update to actions/checkout@v3

11 months agoAdjust tesh tests according to changes in deps.
Maxwell Pirtle [Tue, 30 May 2023 13:49:26 +0000 (15:49 +0200)]
Adjust tesh tests according to changes in deps.

A number of tests were affected by the previous
additions that labeled transitions executed by
the same actor as dependent. The appropriate
modifications were made to the expected outputs
and a "sanity" check was performed before making
them

11 months agoMark transitions run by the same actor as dependent
Maxwell Pirtle [Tue, 30 May 2023 11:46:37 +0000 (13:46 +0200)]
Mark transitions run by the same actor as dependent

This commit adds a missing component to a number of
transition classes. Transitions that are executed by
the same actor are inherently dependent; but only the
RandomTransition actually checked for this case! This
caused ODPOR to search traces incorrectly under the
assumption that transitions which were actually
dependent were independent

11 months agoFix subtle bug in ~_E computation
Maxwell Pirtle [Tue, 30 May 2023 11:42:32 +0000 (13:42 +0200)]
Fix subtle bug in ~_E computation

The computation for the action ~_E requires
that we compute whether `p` is independent with
some sequence of transitions `w` after an
execution `E`. The algorithm for computing
whether an equivalent trace was found works
to iteratively eliminate events from the
equivalent sequence, leaving behind only
the remaining "bits" that are needed for
insertion into a wakeup tree.

The bug involved a typo of `w` for `w_now`
:( :( which broke everything :/

11 months agoadd python bindings for operations
Adrien Gougeon [Tue, 30 May 2023 10:57:58 +0000 (12:57 +0200)]
add python bindings for operations

12 months agoAdd remaining handlers to ReversibleRaceCalculator
Maxwell Pirtle [Fri, 26 May 2023 13:18:04 +0000 (15:18 +0200)]
Add remaining handlers to ReversibleRaceCalculator

This commit adds handlers for each type of transition
to ReversibleRaceCalculator which, as the name suggests,
determines whether a reversible race exists between two
events e1 and e2 based on the type of transition found
at e2. The full semantics have not been added for each
type of transition and will need to be added in the future

12 months agoResolve misconception with ODPOR pseudocode impl.
Maxwell Pirtle [Fri, 26 May 2023 13:12:42 +0000 (15:12 +0200)]
Resolve misconception with ODPOR pseudocode impl.

Like the SDPOR implementation before it, the ODPOR
implementation suffered from a similar fault in its
implementation. Determining whether an insertion was
necessary into a wakeup tree for some point in the
past requires determining whether the sleep set and
the set of weak initials overlap one another. If
their intersection is the empty set, THEN we attempt
to insert an actor. The prior implementation attempted
to find the first such actor that was not contained
in the sleep set, but this is semantically different

12 months agoResolve misconception with SDPOR pseudocode impl.
Maxwell Pirtle [Fri, 26 May 2023 12:45:09 +0000 (14:45 +0200)]
Resolve misconception with SDPOR pseudocode impl.

This commits fixes a semantics mismatch between
the implementation and the pseudocode in SDPOR.
The trouble was that we didn't stop searching
for an initial when we noticed that ANY initial
was contained in the backtrack set; instead, we
simply searched until we found ANY initial contained
OUTSIDE OF the backtrack set. The latter is not
equivalent to the former, so SDPOR was doing
more work than necessary.

A similar implementation issue is also present in
ODPOR which will be resolved in due time.

12 months agoFix subtle bug in Execution regeneration in DFSExplorer
Maxwell Pirtle [Fri, 26 May 2023 08:07:57 +0000 (10:07 +0200)]
Fix subtle bug in Execution regeneration in DFSExplorer

Prior to this commit, during state regeneration,
we had used the state's `get_transition_out()`
method to refill the `Execution` instance bound
to DFSExplorer (`execution_seq_`). The trouble
is that this is an **unstable** source of truth:
it should not be trusted to regenerate an execution.
Instead, the `get_transition_in()` method should
be used on the state which follows. Intuitively,
both methods should be equivalent, which is why
the bug was overlooked for so long. Now that the
execution is correct and that SDPOR/ODPOR are
based on the correct sources of truth, things
are moving along more nicely and the two algorithms
appear to behave more sanely.

In addition to the above bug fix, this commit adds
a return value to the `insert()` function of the
`WakeupTree` class. This extra information is used
in debug logs to get a better idea of what ODPOR
is doing during its insertion. Similar debug information
will be added to SDPOR in subsequent phases.

12 months agoKeep pointers to transitions instead of slices
Maxwell Pirtle [Thu, 25 May 2023 09:18:31 +0000 (11:18 +0200)]
Keep pointers to transitions instead of slices

Prior to this commit, sleep sets contained slices

12 months agoFix two minor bugs in the ODPOR implementation
Maxwell Pirtle [Thu, 25 May 2023 08:25:07 +0000 (10:25 +0200)]
Fix two minor bugs in the ODPOR implementation

This commit fixes the following two bugs:

1. When seeding a wakeup tree for the first
time, we forgot to add a `break` statement
to ensure that only one such enabled thread
were placed into the wakeup tree. Before
all such enabled threads were inserted which
amounted to what would have been a brute-force
search :(.

2. When determining whether a sequence is a
candidate for insertion into a wakeup tree,
we may need to check, for all enabled actors
in a given state, whether those actors'
next steps are independent with the sequence
theretofore constructed. This additional
step peforms the work needed to check whether
those actors are contained in the set of
*weak* initials. The method corresponds
to line 6 of the pseudocode of the ODPOR algorithm

12 months agoPlease Sonar and scan-build.
Arnaud Giersch [Wed, 24 May 2023 12:38:50 +0000 (14:38 +0200)]
Please Sonar and scan-build.

12 months agoMake ASan ignore more odr-violations.
Arnaud Giersch [Wed, 24 May 2023 12:34:42 +0000 (14:34 +0200)]
Make ASan ignore more odr-violations.

12 months agoFix some sonar issues in includes, after upgrade to c++17.
Arnaud Giersch [Wed, 24 May 2023 12:28:22 +0000 (14:28 +0200)]
Fix some sonar issues in includes, after upgrade to c++17.

12 months agoDisable implicit conversions in nlohmann/json.
Arnaud Giersch [Wed, 24 May 2023 16:18:15 +0000 (18:18 +0200)]
Disable implicit conversions in nlohmann/json.

See https://github.com/nlohmann/json#implicit-conversions

12 months agoAdd reversible race implementations for Comm actions
Maxwell Pirtle [Wed, 24 May 2023 12:04:32 +0000 (14:04 +0200)]
Add reversible race implementations for Comm actions

12 months agoAdd reversible race calculator
Maxwell Pirtle [Wed, 24 May 2023 11:09:05 +0000 (13:09 +0200)]
Add reversible race calculator

Determining whether or not a race between
two events is reversible is a critical component
of ODPOR. It turns out that we need to specialize
the race detection to the action types themselves.
Knowing the types of the transitions will help us
determine whether the race is reversible.

12 months agoAdd non-trivial insertion test
Maxwell Pirtle [Wed, 24 May 2023 09:32:20 +0000 (11:32 +0200)]
Add non-trivial insertion test

12 months agomove handling of remote disks to platform parsing.
Fred Suter [Tue, 23 May 2023 14:17:54 +0000 (10:17 -0400)]
move handling of remote disks to platform parsing.
they should be accessible without having to load the filesystem plugin.
only the notion of mounting point really pertains to the plugin

12 months agoadd accessors
Fred Suter [Tue, 23 May 2023 12:08:43 +0000 (08:08 -0400)]
add accessors

12 months agoSpecialize the Activity on_veto, on_suspend and on_resume in AnyActivity to ease...
Martin Quinson [Wed, 24 May 2023 00:02:02 +0000 (02:02 +0200)]
Specialize the Activity on_veto, on_suspend and on_resume in AnyActivity to ease the matching

12 months agoHide a bit an internal method (make it protected)
Martin Quinson [Tue, 23 May 2023 22:45:49 +0000 (00:45 +0200)]
Hide a bit an internal method (make it protected)

12 months agoeasy cleanup
Martin Quinson [Tue, 23 May 2023 22:25:44 +0000 (00:25 +0200)]
easy cleanup

12 months agoGive the on_this_ variant to all VM signals
Martin Quinson [Tue, 23 May 2023 21:56:46 +0000 (23:56 +0200)]
Give the on_this_ variant to all VM signals

12 months agoSort the signals on the plugin page
Martin Quinson [Tue, 23 May 2023 21:27:32 +0000 (23:27 +0200)]
Sort the signals on the plugin page

+ also fix some documentation errors

12 months agoRename Resource::on_state_change to Resource::on_onoff for sake of clarity
Martin Quinson [Tue, 23 May 2023 21:20:44 +0000 (23:20 +0200)]
Rename Resource::on_state_change to Resource::on_onoff for sake of clarity

12 months agoUse the right version for the deprecate macro
Martin Quinson [Tue, 23 May 2023 20:39:09 +0000 (22:39 +0200)]
Use the right version for the deprecate macro

12 months agoGive the _this_ variants to the Link signals
Martin Quinson [Tue, 23 May 2023 19:50:15 +0000 (21:50 +0200)]
Give the _this_ variants to the Link signals

12 months agoIgnore ASan warnings about odr-violation with Activity_T::on_completion.
Arnaud Giersch [Tue, 23 May 2023 15:33:45 +0000 (17:33 +0200)]
Ignore ASan warnings about odr-violation with Activity_T::on_completion.

These are false positives IIUC.

[ci-skip]

12 months agoMerge branch 'master' of framagit.org:simgrid/simgrid
Martin Quinson [Tue, 23 May 2023 18:57:11 +0000 (20:57 +0200)]
Merge branch 'master' of framagit.org:simgrid/simgrid

12 months agoVarious cleanups in the Host signals
Martin Quinson [Tue, 23 May 2023 18:43:26 +0000 (20:43 +0200)]
Various cleanups in the Host signals

- Add a on_this_*_cb variant to the Host signals
- Rename Activity::on_{suspended,resumed} for symmetry with Actor signals
- Change kernel::activity::CpuAction::on_state_change to s4u::Host::on_exec_state_change

12 months agoRemove global variables in PageStore_test too (mimic Snapshot_test).
Arnaud Giersch [Tue, 23 May 2023 13:46:51 +0000 (15:46 +0200)]
Remove global variables in PageStore_test too (mimic Snapshot_test).

12 months agoUse C++17 features: std::scoped_lock and structured bindings.
Arnaud Giersch [Tue, 23 May 2023 12:33:54 +0000 (14:33 +0200)]
Use C++17 features: std::scoped_lock and structured bindings.

12 months agoUse the "_t" and "_v" version of type traits.
Arnaud Giersch [Tue, 23 May 2023 12:26:38 +0000 (14:26 +0200)]
Use the "_t" and "_v" version of type traits.

12 months agoCompact namespaces.
Arnaud Giersch [Tue, 23 May 2023 10:05:47 +0000 (12:05 +0200)]
Compact namespaces.

12 months agoC++17 support is now required for public headers too.
Arnaud Giersch [Tue, 23 May 2023 09:45:42 +0000 (11:45 +0200)]
C++17 support is now required for public headers too.

Update ChangeLog, FindSimGrid.cmake, and sonar-project.properties.

12 months agoAdd tests for initials and independence for Execution
Maxwell Pirtle [Tue, 23 May 2023 12:24:13 +0000 (14:24 +0200)]
Add tests for initials and independence for Execution

12 months agoadd Io operations and an example
Fred Suter [Tue, 23 May 2023 10:36:14 +0000 (06:36 -0400)]
add Io operations and an example

12 months agoAdd first round of execution independence tests
Maxwell Pirtle [Tue, 23 May 2023 08:18:24 +0000 (10:18 +0200)]
Add first round of execution independence tests

This commit adds the first set of tests for
checking whether a particular transition `t` is
independent with an extension `w` of an execution
sequence `E`. This is needed to determine whether
the transition `t` satisfies condition (2) of the
procedure outlined in the ODPOR paper for testing
whether `v ~_[E] w` holds between two sequences

12 months agoanother try to please clang
Fred Suter [Tue, 23 May 2023 08:17:57 +0000 (04:17 -0400)]
another try to please clang

12 months agotry to solve the -Wundefined-var-template thing with clang
Fred Suter [Tue, 23 May 2023 07:56:02 +0000 (03:56 -0400)]
try to solve the -Wundefined-var-template thing with clang

12 months agoallow operation to execute more than one function at start and end
Fred Suter [Tue, 23 May 2023 07:55:06 +0000 (03:55 -0400)]
allow operation to execute more than one function at start and end

12 months agoadd missing override
Fred Suter [Mon, 22 May 2023 19:21:41 +0000 (15:21 -0400)]
add missing override

12 months agohave a on_completion per activity type to save users some dynamic_cast-based filtering
Fred Suter [Mon, 22 May 2023 17:49:53 +0000 (13:49 -0400)]
have a on_completion per activity type to save users some dynamic_cast-based filtering

12 months agoAdd instance signals for all Disk signals
Martin Quinson [Mon, 22 May 2023 15:13:14 +0000 (17:13 +0200)]
Add instance signals for all Disk signals

12 months agoAdd instance signals for all Actor signals
Martin Quinson [Mon, 22 May 2023 15:02:54 +0000 (17:02 +0200)]
Add instance signals for all Actor signals

12 months agono need to save all ns3 sink points
Martin Quinson [Sat, 20 May 2023 22:05:31 +0000 (00:05 +0200)]
no need to save all ns3 sink points

12 months agoRename cfg 'ns3/TcpModel' to 'ns3/UdpModel'
Martin Quinson [Sat, 20 May 2023 21:46:51 +0000 (23:46 +0200)]
Rename cfg 'ns3/TcpModel' to 'ns3/UdpModel'

12 months agoTest that setting ns3 TCP models actually work
Martin Quinson [Fri, 19 May 2023 14:35:57 +0000 (16:35 +0200)]
Test that setting ns3 TCP models actually work

12 months agocosmetics in the ChangeLog
Martin Quinson [Fri, 12 May 2023 12:46:17 +0000 (14:46 +0200)]
cosmetics in the ChangeLog

12 months ago allow activities launched by maestro to be instrumented
Fred Suter [Mon, 22 May 2023 12:33:42 +0000 (08:33 -0400)]
 allow activities launched by maestro to be instrumented

12 months agothrow on_send and on_receive signals when doing a host-to-host Comm
Fred Suter [Wed, 17 May 2023 19:14:07 +0000 (15:14 -0400)]
throw on_send and on_receive signals when doing a host-to-host Comm
this is needed by instrumentation

12 months agoallow to set tracing category in STARTING state
Fred Suter [Tue, 16 May 2023 15:40:38 +0000 (11:40 -0400)]
allow to set tracing category in STARTING state

12 months agoAdd test for removing the first single-process subtree
Maxwell Pirtle [Mon, 22 May 2023 11:56:30 +0000 (13:56 +0200)]
Add test for removing the first single-process subtree

This commit adds the first test checking whether
removing the first single-process node from the
tree produces the correct results, viz. that the
resulting tree is the same as before save for the
missing branch

12 months agoBegin adding tests for subtree rooting
Maxwell Pirtle [Mon, 22 May 2023 11:20:02 +0000 (13:20 +0200)]
Begin adding tests for subtree rooting

12 months agoAdd detailed stress test for WakeupTree
Maxwell Pirtle [Mon, 22 May 2023 09:03:48 +0000 (11:03 +0200)]
Add detailed stress test for WakeupTree

This commit introduces an edge case wherein
a "different looking sequence" ultimately is
already accounted for by a sequence contained
in the tree that "eventually could be made to
look like it" (viz. such that `~_E` holds
between the two sequences). Other stress tests
will be added for the other methods on the
WakeupTree and the Execution to test their
correctness. There is a long way to go

12 months agoBegin first round of in-depth tests for WakeupTree
Maxwell Pirtle [Mon, 22 May 2023 08:52:54 +0000 (10:52 +0200)]
Begin first round of in-depth tests for WakeupTree

12 months agoExplicitly capture required scope variables (sonar).
Arnaud Giersch [Wed, 17 May 2023 12:14:35 +0000 (14:14 +0200)]
Explicitly capture required scope variables (sonar).

12 months agoGet rid of global variables for snapshot tests.
Arnaud Giersch [Wed, 17 May 2023 12:01:57 +0000 (14:01 +0200)]
Get rid of global variables for snapshot tests.

Also fix some sonar issues.

12 months agoAdd first "working" version of ODPOR
Maxwell Pirtle [Wed, 17 May 2023 11:46:20 +0000 (13:46 +0200)]
Add first "working" version of ODPOR

This commit introduces the first version of
ODPOR which detects a bug using the example
programs found in SimGrid's test suite! There
is still work to be done (e.g. dealing with
transitions that have multiple possible
paths of execution such as MCRandom() will
be non-trivial to resolve).

The key adjustments in this commit are
to the WakeupTree structure itself. Gone
are the days when each node in the tree
maintained a sequence of transitions to
execute; instead, each node contains only
a single transition, and its the paths between
a node and the root that describe the partial
executions that ODPOR needs to explore.
This resulted from a misconception I had about
the structure of wakeup trees. When an insertion
is made, potentially a *chain* of leaf nodes
are added into the tree. This ensures we always
have a single-process branch to pick (which
is what we expected) and greatly improves the
readability of some of the methods found in
State.cpp related to ODPOR

12 months agofix example photovoltaic
Adrien Gougeon [Tue, 16 May 2023 16:02:10 +0000 (18:02 +0200)]
fix example photovoltaic

12 months agoadd photovoltaic plugin
Adrien Gougeon [Tue, 16 May 2023 14:07:34 +0000 (16:07 +0200)]
add photovoltaic plugin

12 months agoAdd tests before changes to WakeupTree structure
Maxwell Pirtle [Tue, 16 May 2023 13:07:31 +0000 (15:07 +0200)]
Add tests before changes to WakeupTree structure

12 months agoReduce scope for variables.
Arnaud Giersch [Tue, 16 May 2023 12:44:01 +0000 (14:44 +0200)]
Reduce scope for variables.

12 months agoDon't shadow outer variables.
Arnaud Giersch [Tue, 16 May 2023 09:29:39 +0000 (11:29 +0200)]
Don't shadow outer variables.

12 months agoUse plain pointers instead of references to pointer.
Arnaud Giersch [Mon, 15 May 2023 15:12:12 +0000 (17:12 +0200)]
Use plain pointers instead of references to pointer.

12 months agoAdd some strategies and fix the semantics of Max/MinMatch
mlaurent [Tue, 16 May 2023 11:09:27 +0000 (13:09 +0200)]
Add some strategies and fix the semantics of Max/MinMatch

12 months agoAdd first round of extensive docs to ODPOR methods
Maxwell Pirtle [Tue, 16 May 2023 08:55:29 +0000 (10:55 +0200)]
Add first round of extensive docs to ODPOR methods

12 months agoAdd test files for WakeupTree
Maxwell Pirtle [Tue, 16 May 2023 06:48:13 +0000 (08:48 +0200)]
Add test files for WakeupTree

12 months agoAdd explicit ODPOR clean-up phase to DFSExplorer
Maxwell Pirtle [Mon, 15 May 2023 13:31:31 +0000 (15:31 +0200)]
Add explicit ODPOR clean-up phase to DFSExplorer

ODPOR requires that we remove elements from the
wakeup tree and add elements to the sleep sets
at state in the execution only AFTER we've
completed fully the recursive exploration of the
space pointed towards by the wakeup trees; i.e.,
we only remove subtrees and add to the sleep sets
when we're walking back UP the state stack looking
for a point to recontinue the execution.

12 months agoAdd ODPOR "backtracking" logic
Maxwell Pirtle [Mon, 15 May 2023 08:50:25 +0000 (10:50 +0200)]
Add ODPOR "backtracking" logic

12 months agoAdd ODPOR extension computation (lines 4-6)
Maxwell Pirtle [Fri, 12 May 2023 11:19:50 +0000 (13:19 +0200)]
Add ODPOR extension computation (lines 4-6)

ODPOR asks us to compute, for each reversible
race in the current maximal execution `E`,
whether some subsequence `v` of events
extending a prefix `E'` of `E` should be
inserted into a wakeup tree.

There's a few subtle details that should
be noted in this computation. ODPOR asks
us to compute `notdep(e, E)`, which means
possibly looking at events that occur
*after* `e'` and THEN adding `proc(e')`.
The subtlety lies in the fact that the
actual transition associated with `e'`
must be added AFTER all of the others.
We got lucky with SDPOR since next_E_p
was already in the last position and
thus required no special treatment. With
ODPOR, we have to be more careful.

Even more subtle is the observation that
any events in `notdep(e, E)` can neither
affect the enabledness of `e'` nor can
`e'` affect the enabledness of any of
those events, or else if they do
affect the enabledness of `e'` they
will necessarily be contained "between"
`e` and `e'`

12 months agoUse `std::shared_ptr<Transition>` for Execution
Maxwell Pirtle [Fri, 12 May 2023 08:11:33 +0000 (10:11 +0200)]
Use `std::shared_ptr<Transition>` for Execution

Prior to this commit, the `Execution` class
maintained raw pointers to the transitions
maintained by the stack used in DFSExplorer.
Instead, we opt for the execution to contain
a collection of shared pointers to facilitate
the creation of partial executions

12 months agoAdd ODPOR race detection phase rough-draft
Maxwell Pirtle [Fri, 12 May 2023 07:55:10 +0000 (09:55 +0200)]
Add ODPOR race detection phase rough-draft

ODPOR is decoposed into two parts: the "passive"
observer phase, where ODPOR selects search points
based on the work it did before to fill in its
wakeup trees, and the active race-detection phase,
where ODPOR looks at all reversible races in an
execution and performs the work to determine if
new traces need be searched. This commit adds
in an outline for the latter phase. Note that
there is still much work to be done with respect
to the race detection -- we still need to implement
the partial execution function for example.

Likewise, handling the issue of multiple execution
possibilities for a given process will be particularly
tricky.

12 months agoAdd boolean check for wakeup tree initialization
Maxwell Pirtle [Thu, 11 May 2023 13:36:28 +0000 (15:36 +0200)]
Add boolean check for wakeup tree initialization

While not great, one way to prevent the wakeup
tree from continuing to add elements after it
has already done so when empty is to add a
boolean flag that's checked to prevent the
addition. For now, we'll live with it

12 months agoAutomatically remove nodes from parents
Maxwell Pirtle [Thu, 11 May 2023 12:18:56 +0000 (14:18 +0200)]
Automatically remove nodes from parents

After removing a node from a WakeupTree,
we need to be careful to also have any references
to the node removed, viz. that held onto the
parent of the node in the list of children.
This commit adds a back reference to the
parent node of a given WakeupTreeNode to
allow removal from the parent when destroyed.

Additionally, some bugs were fixed for creating
subtrees and removing subtrees (we forgot to remove
the root for example)

12 months agoAdd tree pruning/subtree methods to State
Maxwell Pirtle [Thu, 11 May 2023 10:38:46 +0000 (12:38 +0200)]
Add tree pruning/subtree methods to State

ODPOR requires that we can remove a
subtree from a wakeup tree as we continue
the exploration. Further, we must also be
able to create a subtree from a given
wakeup tree. The functionality for those
methods has already been added; this commit
instead introduces the management of wakeup
trees specifically in the context of ODPOR
exploration.

12 months agoAdd skeleton for expansion phase of ODPOR
Maxwell Pirtle [Thu, 11 May 2023 09:04:23 +0000 (11:04 +0200)]
Add skeleton for expansion phase of ODPOR

12 months agoAdd logic for subtree node removal
Maxwell Pirtle [Wed, 10 May 2023 13:55:18 +0000 (15:55 +0200)]
Add logic for subtree node removal

ODPOR also mandates that subtrees be removed
from a wakeup tree after having finished searching
"in the direction" of the subtree. This commit
adds a method to WakeupTree which, given a handle
to a node in the tree, removes the subtree rooted at
that node.

12 months agoFinish post-order travesal with WakeupTreeIterator
Maxwell Pirtle [Wed, 10 May 2023 13:03:08 +0000 (15:03 +0200)]
Finish post-order travesal with WakeupTreeIterator

The WakeupTreeIterator is now full implemented:
we now properly add nodes to the top of the
stack in reverse order, resulting in a post-order
traversal as desired.

One subtlety arose with the implementation: the
root node is not contained in the list of any
other node in the tree. To handle this issue,
a "fake" list managed by the iterator was added
into which the root is placed at construction-time.
This prevents us from needing to change any of the
logic, and we can simply treat the root as any other
node in the traversal

12 months agoAdd logic for subtree extraction from wakeup trees
Maxwell Pirtle [Wed, 10 May 2023 12:34:02 +0000 (14:34 +0200)]
Add logic for subtree extraction from wakeup trees

Extracting a subtree from a wakeup tree is required
for ODPOR to continue its search and to pass information
down to the other paths that ODPOR decides to visit.
Extracting a copy of a subtree is difficult as it
requires a deep copy of the tree, making sure
that references to any nodes in the tree that is copied
are copied appropriately. One additional subtlety is that
the subtree can only be taken with respect to single-process
branches and, further, that that process is removed from
each descendant of the node that contains the single process.

12 months agoAdd complicated computation of v ~_E w to Execution
Maxwell Pirtle [Wed, 10 May 2023 09:38:07 +0000 (11:38 +0200)]
Add complicated computation of v ~_E w to Execution

The relation `v ~_E w` is used when traversing
a WakeupTree to determine is an "equivalent"
execution is already noted in the tree. This commit
adds the first "working" implementation of
several components to this process, viz.

1. Assuming that iteration has been implemented
(which is to come in future commits), the WakeupTree
now implements the `insert_E(v, B)` operation, where
`B` refers to the tree instance itself.

2. The `Execution` class can now determine what
is needed to complete the `insert()` operation,
specifically determining first if a) two sequences
`v` and `w` are related by `v ~_E w` and b)
what the smallest sequence `w'` is such that
`w [= v.w'`. The latter computation uses the neat
observation that (w / v) is the smallest such
sequence (viz. removing anything in `w` that's in
`v` "one at a time") and computes this value as
it is in the process of determining whether the
`~_E` relation noted holds

12 months agoAdd skeleton of implementation for tree insertion
Maxwell Pirtle [Wed, 10 May 2023 07:08:27 +0000 (09:08 +0200)]
Add skeleton of implementation for tree insertion

The `insert` method on a Wakeup tree is an
essential component of the ODPOR algorithm.
Tree insertion guides the ODPOR algorithm
towards the unique, unsearched traces of the
state space. Insertion is based heavily on the
correctness of computing the `~` relation over
a given execution. Subsequent commits will fill
in this method as well as several others that
will be needed to implement that functionality

12 months agoAdd WakeupTreeIterator and WakeupTree skeletons
Maxwell Pirtle [Tue, 9 May 2023 14:34:04 +0000 (16:34 +0200)]
Add WakeupTreeIterator and WakeupTree skeletons

12 months agoAdd more docmentation for get_first_sdpor_initial()
Maxwell Pirtle [Tue, 16 May 2023 07:39:15 +0000 (09:39 +0200)]
Add more docmentation for get_first_sdpor_initial()

A very important function at the center of SDPOR
was missing significant context that would help
a reader understand what exactly was going on
with the function. What makes the situation tricky
is the fact that the pseudocode's implementation
is blended into several lines and computed "on the
fly" rather than fully.

12 months agoSuprious brace (fix non-linux builds).
Arnaud Giersch [Mon, 15 May 2023 13:25:05 +0000 (15:25 +0200)]
Suprious brace (fix non-linux builds).

12 months agoDefine master_socket_name only once, and embed it with the request to fork.
Arnaud Giersch [Mon, 15 May 2023 08:39:45 +0000 (10:39 +0200)]
Define master_socket_name only once, and embed it with the request to fork.

12 months agoTry harder not to fail with stale sockets after several runs.
Arnaud Giersch [Fri, 12 May 2023 09:19:55 +0000 (11:19 +0200)]
Try harder not to fail with stale sockets after several runs.

* on linux, prefer abstract unix sockets that are automatically removed
* otherwise, remove possible stale socket before bind

12 months agoThe default destructor should be fine.
Arnaud Giersch [Fri, 12 May 2023 11:15:06 +0000 (13:15 +0200)]
The default destructor should be fine.

12 months agoAdd more documentation to ClockVector/Execution
Maxwell Pirtle [Mon, 15 May 2023 07:37:22 +0000 (09:37 +0200)]
Add more documentation to ClockVector/Execution

12 months agoAdd unit tests for ClockVector
Maxwell Pirtle [Mon, 15 May 2023 07:04:11 +0000 (09:04 +0200)]
Add unit tests for ClockVector

12 months agoFix MANIFEST.in
Maxwell Pirtle [Tue, 9 May 2023 11:57:07 +0000 (13:57 +0200)]
Fix MANIFEST.in

We should note that the Execution that's a part of
both ODPOR and SDPOR is now contained in DFSExplorer
even in stateless execution. This will likely eventually
be true also for ODPOR; hence, the ODPOR sources
have been added to the SRC_MC_STATELESS portion as
needed

12 months agoIntegrate SDPOR into `model-check/reduction` flag
Maxwell Pirtle [Tue, 9 May 2023 08:36:13 +0000 (10:36 +0200)]
Integrate SDPOR into `model-check/reduction` flag

SDPOR and ODPOR can be used as part of the
DFSExplorer (ODPOR should integrate with some
minor details in the DFS implementation, but that's
for a later PR). This commit replaces the simple
`with_dpor` boolean flag used to control the
reduction with the more precise `ReductionMode`
that is newly extracted from within `DFSExplorer`
and is instead made "public"

12 months agoAdd more documentation to essential SDPOR methods
Maxwell Pirtle [Fri, 5 May 2023 12:47:07 +0000 (14:47 +0200)]
Add more documentation to essential SDPOR methods

12 months agoModify tesh suite expectations with changes to dependencies
Maxwell Pirtle [Tue, 9 May 2023 07:47:27 +0000 (09:47 +0200)]
Modify tesh suite expectations with changes to dependencies

12 months agoFix ObjectAccess dependency check
Maxwell Pirtle [Fri, 5 May 2023 12:21:17 +0000 (14:21 +0200)]
Fix ObjectAccess dependency check

The ObjectAccess transition should defer
dependency computation to the ActorJoin action.
Previously, it only decided dependency by
simply checking if the `other` transition
were simply another object access on the
same object

12 months agoFix subtlety with SDPOR/ODPOR initials
Maxwell Pirtle [Fri, 5 May 2023 09:16:07 +0000 (11:16 +0200)]
Fix subtlety with SDPOR/ODPOR initials

Computing initials for SDPOR/ODPOR requires
extending a search with respect to
a prefix of an execution. Previously, events
added to the extension were referred to by
their location within the larger execution
from which the prefix was taken. The problem
is that the new events need to be referred
to by their position relative to the
*extension* of the prefix; otherwise,
asking about "happens-before" in the extension
while using their handles in the full execution
will give incorrect results

12 months agoFix two off-by-one errors with clock vectors
Maxwell Pirtle [Fri, 5 May 2023 08:29:02 +0000 (10:29 +0200)]
Fix two off-by-one errors with clock vectors

Two errors were identified with managing clock
vectors in the Execution class. The index
assigned to the new transition was previously
`size() + 1` when it should have read `size()`.
Furthermore, the loop for checking "happens-between"
events excluded event 0. Both issues are now resolved
and a test with a race at the beginning was added
as verification

12 months agoMark `ActorJoin` dependent with `target_`
Maxwell Pirtle [Fri, 5 May 2023 06:53:47 +0000 (08:53 +0200)]
Mark `ActorJoin` dependent with `target_`

The `ActorJoin` transition was previously
labeled as independent with all other
transitions, including those of the actor
upon which the join acted. However, this
assumption was faulty: the join action is
instead dependent with ANY transition executed
by the actor joined upon, as the action
BECOMES enabled only as soon as the last action
run by the actor is executed.