Skip to content

Commit

Permalink
Merge pr #27: relax clock assignment checks to allow assignment from …
Browse files Browse the repository at this point in the history
…doubles

Symbolic feature: allow assigning doubles to clocks
  • Loading branch information
mikucionisaau authored Oct 7, 2022
2 parents 899bf44 + b9c6ec5 commit 3bf8c01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/featurechecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void FeatureChecker::visitAssignment(expression_t& ass)
{
switch (ass.getKind()) {
case Constants::ASSIGN:
if (ass.usesFP() && !ass.usesHybrid())
if (ass.usesFP() && !ass.usesHybrid() && !ass.get(0).getType().isClock())
supportedMethods.symbolic = false;
break;
case Constants::COMMA:
Expand Down
2 changes: 1 addition & 1 deletion test/test_featurechecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ TEST_CASE("Hybrid and normal clock update")
auto document = std::make_unique<UTAP::Document>();
parseXMLBuffer(read_content("updateHybridAndNormalClock.xml").c_str(), document.get(), true);
UTAP::FeatureChecker checker(*document);
CHECK(!checker.getSupportedMethods().symbolic);
CHECK(checker.getSupportedMethods().symbolic);
CHECK(checker.getSupportedMethods().stochastic);
}

Expand Down

0 comments on commit 3bf8c01

Please sign in to comment.