Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
17033c9
Added dependencies to README
ifndefJOSH Jun 29, 2022
1094651
Some stuff for threading
ifndefJOSH Jul 1, 2022
01b8ef3
Added some stuff
ifndefJOSH Jul 1, 2022
423d036
Notes for multithreading
ifndefJOSH Jul 7, 2022
c099b02
Template for multithreading
ifndefJOSH Jul 7, 2022
ed85428
Moved stuff around
ifndefJOSH Jul 7, 2022
7456bbc
Removed ThreadBase class
ifndefJOSH Jul 7, 2022
4fafed1
Moved threads to separate namespace
ifndefJOSH Jul 8, 2022
15a7c49
Added comments and more skeletal structure for threads
ifndefJOSH Jul 8, 2022
66f2887
Moving some code around
ifndefJOSH Jul 8, 2022
523b4e9
Renamed BookKeeperThread to ControlThread
ifndefJOSH Jul 8, 2022
13a8efc
Some changes
ifndefJOSH Jul 8, 2022
51232cf
Removed unused class
ifndefJOSH Jul 8, 2022
95811b2
Updated docs and some work
ifndefJOSH Jul 8, 2022
65990a1
Moving some stuff to 'core'
ifndefJOSH Jul 8, 2022
ee70a95
Create 'core' namespace and move some things around
ifndefJOSH Jul 8, 2022
ad0a8c0
Updated CMakeLists
ifndefJOSH Jul 8, 2022
dcaf33d
Edited CMakeLists
ifndefJOSH Jul 8, 2022
80aee6d
Edited CMakeLists 2
ifndefJOSH Jul 8, 2022
0690727
Changes
ifndefJOSH Jul 8, 2022
94b759c
fixed preproc statements to fit a style guide
ifndefJOSH Jul 8, 2022
773e1da
Working closer to getting refactored version to compile
ifndefJOSH Jul 8, 2022
4297cdd
Getting even closer
ifndefJOSH Jul 11, 2022
8531484
Some progress
ifndefJOSH Jul 11, 2022
54bcb27
Added lockable queue
ifndefJOSH Jul 11, 2022
8a24687
Now I just need to move stuff from model builders into the threads
ifndefJOSH Jul 11, 2022
f7a8e3e
Some implementation
ifndefJOSH Jul 11, 2022
2a019d4
Most of the header files and includes work but now StaminaModelBuilde…
ifndefJOSH Jul 11, 2022
d29c312
Some more implementation
ifndefJOSH Jul 11, 2022
f2c40a7
Got rid of issue with warning in StaminaMessages
ifndefJOSH Jul 12, 2022
73f9299
Added -j option to sstamina
ifndefJOSH Jul 12, 2022
325c284
Adding stuff to preferences
ifndefJOSH Jul 12, 2022
464a332
Added -j option to sstamina (missed this file)
ifndefJOSH Jul 12, 2022
d6af7dc
Some debugging regarding parameter order in *Thread
ifndefJOSH Jul 12, 2022
00d9ec7
Working on some changes
ifndefJOSH Jul 12, 2022
9ac4e94
Removed unused remapping method
ifndefJOSH Jul 12, 2022
b58c500
Made some changes
ifndefJOSH Jul 12, 2022
5712f80
Enforcing use of StateAndThreadIndex
ifndefJOSH Jul 13, 2022
e5a5545
Added cast for StateAndThreadIndex to StateType but that didn't fix t…
ifndefJOSH Jul 13, 2022
5bd8bc4
Changed stateStorage back to StateType
ifndefJOSH Jul 13, 2022
b657272
*builder.o files now compile. Threads do not yet
ifndefJOSH Jul 13, 2022
65280a6
Slowly working through error messages
ifndefJOSH Jul 13, 2022
f9d1238
Fixed some issues with StateAndProbability
ifndefJOSH Jul 13, 2022
f460b46
Fixed constructor and CMakeLists
ifndefJOSH Jul 14, 2022
de10f6f
Added some of the exploration stuff for IterativeExplorationThread
ifndefJOSH Jul 14, 2022
4849476
Added some more stuff for cross exploration
ifndefJOSH Jul 14, 2022
a8d32fa
Some fixes to StaminaIterativeModelBuilder
ifndefJOSH Jul 14, 2022
de5eaae
Some tiny fixes
ifndefJOSH Jul 14, 2022
d27bbac
Moving closer
ifndefJOSH Jul 14, 2022
04f5ff2
TODO: add getLocalKappa() implementation
ifndefJOSH Jul 14, 2022
e686aaa
It compiles now
ifndefJOSH Jul 14, 2022
e1707f2
Adding a couple of things
ifndefJOSH Jul 14, 2022
e7c0bba
added skeleton
ifndefJOSH Jul 14, 2022
54fb3cf
Added getter for localKappa
ifndefJOSH Jul 14, 2022
3cc28a1
At an impasse: cross exploration requires CompressedState&
ifndefJOSH Jul 14, 2022
2f44c69
Added getting state index in control thread
ifndefJOSH Jul 15, 2022
750a096
This should work if and only if stateProbabilityPairs are created in …
ifndefJOSH Jul 15, 2022
de2cb55
Merge branch 'master' into multithreading
ifndefJOSH Jul 15, 2022
fd05ef7
Getting closer
ifndefJOSH Jul 15, 2022
6bd890f
isInit should not be necessary in thread
ifndefJOSH Jul 15, 2022
1413675
Added threaded iterative model builder
ifndefJOSH Jul 15, 2022
41a81f1
Added threaded priority model builder
ifndefJOSH Jul 15, 2022
be2eef0
getting closer to it compiling
ifndefJOSH Jul 18, 2022
8c3866d
It now compiles
ifndefJOSH Jul 18, 2022
0270faa
Missed these files
ifndefJOSH Jul 19, 2022
e4928b6
Added to threaded iterative model builder
Jul 19, 2022
cf1fca3
Added 'hold' for threads
Jul 19, 2022
58dc070
Inching closer to threaded iterative working
ifndefJOSH Jul 21, 2022
15e8e5f
Some changes
ifndefJOSH Jul 21, 2022
aaf92bd
Issue with conflicting return type and templatization
ifndefJOSH Jul 21, 2022
ca62100
Merge branch 'master' into multithreading
ifndefJOSH Jul 22, 2022
dc3f73e
modified readme
ifndefJOSH Jul 22, 2022
ce4c85d
Added dropdown to access wiki
ifndefJOSH Aug 4, 2022
ea5c6aa
Switch position of ValueType and StateType in template
gerbs-11 Aug 5, 2022
d81569a
Merge remote-tracking branch 'origin/multithreading' into multithreading
gerbs-11 Aug 5, 2022
b11af17
Some more issues with forward declaration
ifndefJOSH Aug 5, 2022
000ff89
Some more issues with forward declaration
ifndefJOSH Aug 5, 2022
af5a021
This didn't work
ifndefJOSH Aug 5, 2022
e233bc5
Moving some structs to a separate file
ifndefJOSH Aug 8, 2022
b86019b
Moved some more stuff
ifndefJOSH Aug 8, 2022
690ef3d
Some more moving around
ifndefJOSH Aug 8, 2022
369bccf
Merge branch 'master' into multithreading
ifndefJOSH Aug 8, 2022
c7c386d
Not sure why 'ControlThread' is saying it's not declared
ifndefJOSH Aug 8, 2022
e2ada7b
Fixed dependency issue
ifndefJOSH Aug 8, 2022
46c01a1
Fixed a small bug. Does not compile yet
ifndefJOSH Aug 8, 2022
26dd833
Getting closer
ifndefJOSH Aug 8, 2022
cfbd402
Fixed another bug
ifndefJOSH Aug 8, 2022
2ad0318
Fixed another bug
ifndefJOSH Aug 8, 2022
1f82abc
Fixed another bug
ifndefJOSH Aug 9, 2022
7d9dcda
Fully fixed last bug
ifndefJOSH Aug 9, 2022
453d06e
Fixed another compile error
ifndefJOSH Aug 9, 2022
da04cf2
Fixed compilation errors with ControlThread
ifndefJOSH Aug 9, 2022
7463422
Fixed another bug
ifndefJOSH Aug 9, 2022
9611216
Fixed another bug with ExplorationThread
ifndefJOSH Aug 9, 2022
8db8731
Working on IterativeExplorationThread
ifndefJOSH Aug 9, 2022
16fa197
Moved around the location of a datastructure and added getter method …
ifndefJOSH Aug 9, 2022
2da883d
Getting closer
ifndefJOSH Aug 9, 2022
fa7af9c
Slowly but surely getting closer to compilation
ifndefJOSH Aug 10, 2022
1dd56fd
Added copy constructor but that didn't help
ifndefJOSH Aug 10, 2022
e619762
Kind of stuck
ifndefJOSH Aug 10, 2022
63bbaf0
The compile error is in the emplacement of the main exploration queue
ifndefJOSH Aug 11, 2022
9cf6b02
Adding 'this' keyword to access parent class members
ifndefJOSH Aug 11, 2022
f79ec7f
Added several 'this' keywords
ifndefJOSH Aug 11, 2022
592703f
A couple of changes
ifndefJOSH Aug 11, 2022
dd26f4a
Fixed constructor
ifndefJOSH Aug 11, 2022
3f5cb96
Fixing some more bugs
ifndefJOSH Aug 11, 2022
5d10a12
It compiles but there is a linker error
ifndefJOSH Aug 11, 2022
ddd589c
Added a couple of implementations to try to fix linker error
ifndefJOSH Aug 15, 2022
e602046
The linker error may be in the control thread constructor
ifndefJOSH Aug 15, 2022
afff16e
Modified CMakeLists but that didn't fix the linker error
ifndefJOSH Aug 15, 2022
dd615f9
A failed attempt to fix the linker error
ifndefJOSH Aug 15, 2022
5225ac6
Revert changes. I think it needs to be done in STORM
ifndefJOSH Aug 15, 2022
7d1340d
Merge pull request #23 from fluentverification/master
ifndefJOSH Aug 22, 2022
b724d2a
changed Cmakelists
ifndefJOSH Aug 31, 2022
ae22baa
changed StateStorage in ControlThread to BitVectorHashMap
ifndefJOSH Sep 1, 2022
52b131a
ControlThread ses Murmur3BitVectorHash now
ifndefJOSH Sep 1, 2022
e7b400b
removed instantiation in stamina--must be done in storm
ifndefJOSH Sep 1, 2022
d5fc92a
This creates the exploration threads, however it does not yet compile
ifndefJOSH Sep 7, 2022
317bfcd
Attempting to fix but C++ error messages are opaque
ifndefJOSH Sep 7, 2022
39f09b3
It compiles again
ifndefJOSH Sep 7, 2022
18a52c5
Now it idles forever
ifndefJOSH Sep 7, 2022
a437d52
Referring to issue #24, these print statements indicate the control t…
ifndefJOSH Sep 7, 2022
2de8d50
A couple of changes
ifndefJOSH Sep 14, 2022
8d44be1
fast terminal states start
ifndefJOSH Sep 15, 2022
d956887
I know now what direction to take it:\nWe have to have a separate sta…
ifndefJOSH Sep 15, 2022
6773b04
Now it idles forever
ifndefJOSH Sep 16, 2022
2d810b1
I know what the issue is. The exploration threads are not in the expl…
ifndefJOSH Sep 16, 2022
4be6f85
Now there is a segmentation fault
ifndefJOSH Sep 16, 2022
067c225
Not sure why but the exploration threads are null
ifndefJOSH Sep 16, 2022
6233873
Not sure why it isn't working
ifndefJOSH Sep 16, 2022
b59ec3c
I think I'm making some progress
ifndefJOSH Sep 19, 2022
0778d7a
Made some progress, but still stalling
ifndefJOSH Sep 19, 2022
da05739
Not sure why not working. This commit should better regulate idling o…
ifndefJOSH Sep 19, 2022
01b878b
Changed means of locking mutex
ifndefJOSH Sep 19, 2022
43fe875
Added const qualifier to "whoOwns" and continued to try debugging
ifndefJOSH Sep 20, 2022
7486092
Compiles now
ifndefJOSH Sep 20, 2022
6570e69
Merge pull request #26 from fluentverification/master
ifndefJOSH Sep 20, 2022
332dea2
Moved transition control to ControlThread::registerTransitions()
ifndefJOSH Sep 20, 2022
ee2f439
Merge branch 'multithreading' of github.com:fluentverification/stamin…
ifndefJOSH Sep 20, 2022
16c3d81
Volatile keyword
ifndefJOSH Sep 21, 2022
844f0d8
A test change
ifndefJOSH Sep 21, 2022
6d0a12c
A test change
ifndefJOSH Sep 21, 2022
036d155
Fixed issue #29. All threads finish between iterations now
ifndefJOSH Sep 21, 2022
c834aad
Somehow the contents of IterativeExplorationThread.cpp got pasted int…
ifndefJOSH Sep 21, 2022
db6defc
Revert back to the version where it will segfault rather than run for…
ifndefJOSH Sep 21, 2022
9b6d1f7
Implementation for lockable deque
ifndefJOSH Sep 22, 2022
93d3b08
Added some implementation in the correct place
ifndefJOSH Sep 22, 2022
82c2cc1
Added some stuff to control thread
ifndefJOSH Sep 22, 2022
2883b27
An initial attempt to fix issue #32
ifndefJOSH Sep 22, 2022
0bdaf9e
Generators unique to threads. Should contribute to #30
ifndefJOSH Sep 22, 2022
1fba96a
Default value for generators
ifndefJOSH Sep 22, 2022
262ae87
Made get() method of StateIndexArray const
ifndefJOSH Sep 23, 2022
4354a1d
Don't need getOrAddStateIndex in threads
ifndefJOSH Sep 23, 2022
4a04a07
Trying to figure out how to properly bind the stateToIdCallback in Ex…
ifndefJOSH Sep 23, 2022
995a04e
Changed CompressedState references to const
ifndefJOSH Sep 23, 2022
aa4912b
Missed a file. Compiles now
ifndefJOSH Sep 23, 2022
aa5a3bc
Fixed segfault in generators vector
ifndefJOSH Sep 23, 2022
412bd60
These two files are definitions for a Threadsafe drop in for PrismNex…
ifndefJOSH Sep 26, 2022
3042400
Added stuff to ThreadsafePrismNextStateGenerator
ifndefJOSH Sep 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 69 additions & 37 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,49 +4,66 @@
## Requires STORM and boost
##

cmake_minimum_required(VERSION 3.10) # CMake version check
project(sstamina) # Create project "sstamina"
cmake_minimum_required(VERSION 3.10)

# Main STAMINA executable
include_directories("src")
include_directories("src/stamina")

set(CMAKE_CXX_STANDARD 17) # Enable c++17 standard
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_BUILD_TYPE Debug)

# Add main.cpp file of project root directory as source file

# Source files for the main STAMINA CLI
set(SOURCE_DIR src)
set(SOURCE_FILES
# Main source files for the `stamina` namespace
# Main source files for the `stamina` namespace
src/stamina/ANSIColors.h
src/stamina/main.cpp
src/stamina/Stamina.cpp
src/stamina/Stamina.h
src/stamina/StaminaArgParse.h
src/stamina/StaminaModelChecker.h
src/stamina/StaminaModelChecker.cpp
src/stamina/StaminaMessages.h
src/stamina/StaminaMessages.cpp
src/stamina/Options.h
src/stamina/Options.cpp
src/stamina/StateSpaceInformation.cpp
src/stamina/StateSpaceInformation.h
# Files for `stamina::builder` namespace
src/stamina/builder/StaminaModelBuilder.h
src/stamina/builder/StaminaModelBuilder.cpp
src/stamina/builder/StaminaIterativeModelBuilder.cpp
src/stamina/builder/StaminaIterativeModelBuilder.h
# src/stamina/builder/StaminaPriorityModelBuilder.cpp
# src/stamina/builder/StaminaPriorityModelBuilder.h
src/stamina/builder/StaminaReExploringModelBuilder.cpp
src/stamina/builder/StaminaReExploringModelBuilder.h
src/stamina/builder/ExplicitTruncatedModelBuilder.h
src/stamina/builder/ExplicitTruncatedModelBuilder.cpp
src/stamina/main.cpp
src/stamina/Stamina.cpp
src/stamina/Stamina.h
src/stamina/StaminaArgParse.h
)

# STAMINA library files for linking
set(LIB_FILES
# Files for `stamina::core` namespace
src/stamina/core/StaminaModelChecker.h
src/stamina/core/StaminaModelChecker.cpp
src/stamina/core/StaminaMessages.h
src/stamina/core/StaminaMessages.cpp
src/stamina/core/Options.h
src/stamina/core/Options.cpp
src/stamina/core/StateSpaceInformation.cpp
src/stamina/core/StateSpaceInformation.h
# Files for `stamina::util` namespace
src/stamina/util/ModelModify.h
src/stamina/util/ModelModify.cpp
src/stamina/util/StateIndexArray.h
src/stamina/util/StateIndexArray.cpp
src/stamina/util/StateMemoryPool.h
src/stamina/util/StateMemoryPool.cpp

# Files for `stamina::builder` namespace
src/stamina/builder/StaminaModelBuilder.h
src/stamina/builder/StaminaModelBuilder.cpp
src/stamina/builder/StaminaIterativeModelBuilder.cpp
src/stamina/builder/StaminaIterativeModelBuilder.h
src/stamina/builder/StaminaThreadedIterativeModelBuilder.cpp
src/stamina/builder/StaminaPriorityModelBuilder.cpp
src/stamina/builder/StaminaPriorityModelBuilder.h
src/stamina/builder/StaminaReExploringModelBuilder.cpp
src/stamina/builder/StaminaReExploringModelBuilder.h
src/stamina/builder/ExplicitTruncatedModelBuilder.h
src/stamina/builder/ExplicitTruncatedModelBuilder.cpp
# Files for `stamina::builder::threads` namespace
src/stamina/builder/threads/BaseThread.cpp
src/stamina/builder/threads/BaseThread.h
src/stamina/builder/threads/ControlThread.cpp
src/stamina/builder/threads/ControlThread.h
src/stamina/builder/threads/ExplorationThread.cpp
src/stamina/builder/threads/ExplorationThread.h
src/stamina/builder/threads/IterativeExplorationThread.cpp
src/stamina/builder/threads/IterativeExplorationThread.h
)

message("STORM_PATH is set as " ${STORM_PATH})
Expand All @@ -59,18 +76,33 @@ set(CUDD_PATH ${STORM_PATH}/storm/resources/3rdparty/cudd-3.0.0/cplusplus)
find_package(Boost)
if (Boost_FOUND)
message("BOOST found!")
include_directories(${Boost_INCLUDE_DIRS})
include_directories(${Boost_INCLUDES})
include_directories(${Boost_INCLUDE_DIRS})
include_directories(${Boost_INCLUDES})
endif (Boost_FOUND)

find_package(storm REQUIRED PATHS ${STORM_PATH})
# if (storm_FOUND)
# message("STORM found!")
#else
# message("STORM not found! STORM required to build STAMINA!")
#endif
if (storm_FOUND)
message("STORM found!")
else()
message("STORM not found! STORM required to build STAMINA!")
endif()

# STAMINA shared-object libraries project
project(stamina VERSION 2.5.0 DESCRIPTION "Shared objects for STAMINA usage")
include_directories("src")
include_directories("src/stamina")

add_library(stamina SHARED ${LIB_FILES})
set_target_properties(stamina PROPERTIES VERSION ${PROJECT_VERSION})
target_include_directories(${PROJECT_NAME} PUBLIC ${SOURCE_DIR} ${storm_INCLUDE_DIR} ${storm-parsers_INCLUDE_DIR} ${STORM_PATH} ${LIB_PATH})
target_link_libraries(${PROJECT_NAME} PUBLIC storm storm-parsers)

# TODO: Continue cmake for lib: https://stackoverflow.com/questions/17511496/how-to-create-a-shared-library-with-cmake

# Add executable target with source files listed in SOURCE_FILES variable
project(sstamina VERSION 2.5.0 DESCRIPTION "Main STAMINA/STORM executable")
add_executable(sstamina ${SOURCE_FILES})
target_include_directories(${PROJECT_NAME} PUBLIC ${SOURCE_DIR} ${storm_INCLUDE_DIR} ${storm-parsers_INCLUDE_DIR} ${STORM_PATH} ${LIB_PATH})
target_link_libraries(${PROJECT_NAME} PUBLIC storm storm-parsers)
target_link_libraries(${PROJECT_NAME} PUBLIC storm storm-parsers stamina)


153 changes: 153 additions & 0 deletions doc/algorithms/multithreading.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
# Multithreading STAMINA Algorithm

In order to properly create multithreading in STAMINA, we must add mutual exclusions to the state space at some level, however there is a tradeoff in memory impact and CPU time:
+ If we place a Mutex on every single state, we see a massive memory impact. The `std::mutex` and the C equivalent `pthread_mutex_t` are both 40 bytes.
+ If we place one mutex on the entire state space then we see no benefit to multithreading, since every state that is modified must first lock the entire state space for all other threads.
Therefore,

**Exploration Thread Object**

```
OBJECT ExplorationThread
DATA MEMBERS
PUBLIC CONST i -> INT // (written on construction)
PUBLIC numberStatesOwned := INT
PUBLIC finished -> bool // (many read, one write)
PUBLIC X -> queue() (mutex)
PRIVATE S -> queue()
END DATA MEMBERS

METHODS
PUBLIC PROCEDURE doExploration() -> VOID
WHILE shouldNotDie DO
// Weak priority on cross exploration
IF NOT X.empty() AND NOT X.locked() THEN
s := dequeue(X)
Add to s reachability probability
explore(s)
ELSE IF NOT S.empty() THEN
s := dequeue(S)
explore(s)
ELSE
finished := true
END IF
END DO
END PROCEDURE

PUBLIC PROCEDURE explore(s -> state) -> VOID
FOR EACH s' in next(s)
IF owner(s') == null THEN
o := requestOwnership(s')
IF o == i THEN
exploreSuccessor(s')
END IF
ELSE IF owner(s') != i THEN
threads[owner(s')].X.enqueue(s')
ELSE
exploreSuccessor(s')
END IF
END FOR
END PROCEDURE

PUBLIC PROCEDURE exploreSuccessor(s' -> state) -> VOID
(STAMINA 2.0 block)
TODO: Add STAMINA 2.0 block
END PROCEDURE
END METHODS
END OBJECT
```

**Control Thread Object**

```
OBJECT ControlThread
DATA MEMBERS
PRIVATE ownedThreads -> HashMap<state, INT>()
PRIVATE ownershipMutex -> SharedMutex() (Mutex that allows multiple reads but only one write)
PUBLIC transitionMatrixQueues -> list<LockableQueue<INT, INT, double>>() (One queue for each of the threads to prevent the need for sharing mutual exclusion)
END DATA MEMBERS

METHODS
PUBLIC PROCEDURE requestOwnership(state, threadIndex) -> INT
IF state in ownedThreads THEN
RETURN ownedThreads.get(state)
ELSE
TRY LOCK ownershipMutex
WHEN LOCK achieved THEN
(Checks to see of some other state beat us to the lock)
IF state IN ownedThreads THEN
RETURN ownedThreads.get(state)
ELSE
CLAIM OWNERSHIP OF STATE
ownedThreads.insert(state, threadIndex)
RETURN threadIndex
END IF
END WHEN
END IF
END PROCEDURE

PUBLIC PROCEDURE whoOwns(state) -> INT
(DOES NOT LOCK MUTEX)
IF state IN ownedThreads THEN
RETURN ownedThreads.get(state)
ELSE
RETURN null
END IF
END PROCEDURE

PUBLIC PROCEDURE mainLoop() -> VOID
INT numberFinishedThreads := 0
DO WHILE numberFinishedThreads < numberThreads
FOR EACH queue IN transitionMatrixQueues DO
WHILE NOT queue.empty() DO
fromState, toState, rate := queue.dequeue()
transitionMatrixEntries.insert(fromState, toState, rate)
END WHILE
IF THE CORRESPONDING THREAD IS FINISHED
numberFinishedThreads := numberFinxploredThreads + 1
(At some point we should add some defragmentation to transfer thread ownership)
END IF
DONE
END DO
END PROCEDURE
END METHODS
END OBJECT
```

**Model Builder Object**

```
OBJECT ModelBuilder
DATA MEMBERS
threads -> list()
transitionMatrixEntries -> TransitionMatrixEntries() (Asynchronous helper for transition matrix creation)
END DATA MEMBERS
BEGIN METHODS
PUBLIC PROCEDURE exploreStates() -> VOID
initQueue := queue()
si := initialState()
numberPerimeterStates := 0
initQueue.enqueue(si)
DO WHILE numberPerimeterStates < numberThreads
s := dequeue(initQueue)

ENQUEUE ALL successor states and update PI/EXPLOREDMAPS/PERIMETERSTATES
numberPerimeterStates := numberPerimeterStates - 1
END WHILE
index := 1
FOR EACH s IN PERIMETER STATES DO
threads[index].X.enqueue(s)
index := index + 1
END FOR
WHILE anyThreadWorking() DO
IDLE
END WHILE
END PROCEDURE
END METHODS
END OBJECT
```


## METHODS TODO TO IMPLEMENT

+ `StaminaModelBuilder::getStateMap`
6 changes: 3 additions & 3 deletions src/stamina/ANSIColors.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* Modified from https://stackoverflow.com/questions/2616906/how-do-i-output-coloured-text-to-a-linux-terminal
* */

#ifndef ANSI_COLORS_H
#define ANSI_COLORS_H
#ifndef STAMINA_ANSI_COLORS_H
#define STAMINA_ANSI_COLORS_H

/* FOREGROUND */
#define RST "\x1B[0m"
Expand All @@ -28,4 +28,4 @@
#define BOLD(x) "\x1B[1m" x RST
#define UNDL(x) "\x1B[4m" x RST

#endif // ANSI_COLORS_H
#endif // STAMINA_ANSI_COLORS_H
58 changes: 0 additions & 58 deletions src/stamina/Options.h

This file was deleted.

Loading