Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
sillydan1 committed Apr 21, 2022
1 parent 98929da commit cda4ea0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/verifier/ReachabilitySearcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,10 @@ bool ReachabilitySearcher::AreQueriesAnswered(const std::vector<QueryResultPair>
}

bool ReachabilitySearcher::IsSearchStateTockable(const SearchState& state) {
return (!state.justTocked && !state.tta.IsCurrentStateImmediate());
return !state.justTocked
&& !state.tta.IsCurrentStateImmediate();
}

#include <random>
std::random_device r;
ReachabilitySearcher::StateList::iterator ReachabilitySearcher::PickStateFromWaitingList(const nondeterminism_strategy_t& strategy) {
Expand Down
8 changes: 5 additions & 3 deletions src/verifier/TTASuccessorGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ std::vector<TTA::StateChange> SymbolsCrossProduct(const VariableValueVector& pos
const TTA::SymbolMap& derivedSymbols) {
std::vector<TTA::StateChange> return_value{};
std::vector<bool> bitset(predicate_count);
for(auto i = 0; i < pow(2, predicate_count); i++) {
auto size = pow(2, predicate_count);
for(auto i = 0; i < size; i++) {
TTA::StateChange change{};
auto j = 0;
for(auto b : bitset) {
Expand Down Expand Up @@ -189,10 +190,11 @@ std::vector<TTA::StateChange> BFSCrossProduct(const VariableValueVector& a, cons
return crossProduct;
}

std::vector<TTA::StateChange> TTASuccessorGenerator::GetNextTockStates(const TTA &ttaState) {
std::vector<TTA::StateChange> TTASuccessorGenerator::GetNextTockStates(const TTA& ttaState) {
// Get all the interesting variable predicates
auto interestingVarPredicates = GetInterestingVariablePredicatesInState(ttaState);
if(interestingVarPredicates.empty()) return {};
if(interestingVarPredicates.empty())
return {};
VariableValueVector positives{};
VariableValueVector negatives{};
for (auto& predicate : interestingVarPredicates) {
Expand Down

0 comments on commit cda4ea0

Please sign in to comment.