Skip to content

Commit

Permalink
making reviewrs happy
Browse files Browse the repository at this point in the history
  • Loading branch information
martinhruska committed Oct 7, 2023
1 parent 637630c commit c1f4b16
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions include/mata/parser/bdd-domain.hh
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ namespace mata {
return val.IsZero();
}

BDDDomain getTrue() const;
BDDDomain getFalse() const;
BDDDomain getVar() const;
BDDDomain get_true() const;
BDDDomain get_false() const;
BDDDomain get_var() const;
};
}

Expand Down
20 changes: 10 additions & 10 deletions include/mata/parser/mintermization.hh
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,16 @@ private: // private data members

public:
/**
* Takes a set of BDDs and build a minterm tree over it.
* The leaves of BDDs, which are minterms of input set, are returned
* @param source_bdds BDDs for which minterms are computed
* Takes a set of domain values and build a minterm tree over it.
* The leaves of domain values, which are minterms of input set, are returned
* @param domain_values domain values for which minterms are computed
* @return Computed minterms
*/
std::unordered_set<MintermizationDomain> compute_minterms(
const std::unordered_set<MintermizationDomain>& source_bdds)
const std::unordered_set<MintermizationDomain>& domain_values)
{
std::unordered_set<MintermizationDomain> stack{ domain_base.getTrue() };
for (const MintermizationDomain& b: source_bdds) {
std::unordered_set<MintermizationDomain> stack{ domain_base.get_true() };
for (const MintermizationDomain& b: domain_values) {
std::unordered_set<MintermizationDomain> next;
/**
* TODO: Possible optimization - we can remember which transition belongs to the currently processed vars
Expand Down Expand Up @@ -137,9 +137,9 @@ public:
if (symbol_to_var.count(node.name)) {
return symbol_to_var.at(node.name);
} else {
MintermizationDomain res = (node.is_true()) ? domain_base.getTrue() :
(node.is_false() ? domain_base.getFalse() :
domain_base.getVar());
MintermizationDomain res = (node.is_true()) ? domain_base.get_true() :
(node.is_false() ? domain_base.get_false() :
domain_base.get_var());
symbol_to_var.insert(std::make_pair(node.name, res));
return res;
}
Expand Down Expand Up @@ -173,7 +173,7 @@ public:
* @return Mintermized automaton
*/
mata::IntermediateAut mintermize(const mata::IntermediateAut& aut) {
return mintermize(std::vector<const mata::IntermediateAut *>{&aut})[0];
return mintermize(std::vector<const mata::IntermediateAut *>{&aut}).front();
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/bdd-domain.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@

#include "mata/parser/bdd-domain.hh"

struct mata::BDDDomain mata::BDDDomain::getTrue() const {
struct mata::BDDDomain mata::BDDDomain::get_true() const {
return BDDDomain(bdd_mng, bdd_mng.bddOne());
}

struct mata::BDDDomain mata::BDDDomain::getFalse() const {
struct mata::BDDDomain mata::BDDDomain::get_false() const {
return BDDDomain(bdd_mng, bdd_mng.bddZero());
}

struct mata::BDDDomain mata::BDDDomain::getVar() const {
struct mata::BDDDomain mata::BDDDomain::get_var() const {
return BDDDomain(bdd_mng, bdd_mng.bddVar());
}

0 comments on commit c1f4b16

Please sign in to comment.