17 changed files with 286 additions and 20 deletions
-
17src/storm/storage/jani/ArrayEliminator.cpp
-
9src/storm/storage/jani/Automaton.cpp
-
5src/storm/storage/jani/Automaton.h
-
32src/storm/storage/jani/ClockVariable.cpp
-
32src/storm/storage/jani/ClockVariable.h
-
29src/storm/storage/jani/FunctionEliminator.cpp
-
23src/storm/storage/jani/JSONExporter.cpp
-
16src/storm/storage/jani/Location.cpp
-
19src/storm/storage/jani/Location.h
-
12src/storm/storage/jani/Model.cpp
-
5src/storm/storage/jani/Model.h
-
13src/storm/storage/jani/Variable.cpp
-
4src/storm/storage/jani/Variable.h
-
36src/storm/storage/jani/VariableSet.cpp
-
26src/storm/storage/jani/VariableSet.h
-
24src/storm/storage/jani/traverser/JaniTraverser.cpp
-
2src/storm/storage/jani/traverser/JaniTraverser.h
@ -0,0 +1,32 @@ |
|||||
|
#include "storm/storage/jani/ClockVariable.h"
|
||||
|
|
||||
|
namespace storm { |
||||
|
namespace jani { |
||||
|
|
||||
|
ClockVariable::ClockVariable(std::string const& name, storm::expressions::Variable const& variable) : Variable(name, variable) { |
||||
|
// Intentionally left empty.
|
||||
|
} |
||||
|
|
||||
|
ClockVariable::ClockVariable(std::string const& name, storm::expressions::Variable const& variable, storm::expressions::Expression const& initValue, bool transient) : Variable(name, variable, initValue, transient) { |
||||
|
// Intentionally left empty.
|
||||
|
} |
||||
|
|
||||
|
std::unique_ptr<Variable> ClockVariable::clone() const { |
||||
|
return std::make_unique<ClockVariable>(*this); |
||||
|
} |
||||
|
|
||||
|
bool ClockVariable::isClockVariable() const { |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
std::shared_ptr<ClockVariable> makeClockVariable(std::string const& name, storm::expressions::Variable const& variable, boost::optional<storm::expressions::Expression> initValue, bool transient) { |
||||
|
if (initValue) { |
||||
|
return std::make_shared<ClockVariable>(name, variable, initValue.get(), transient); |
||||
|
} else { |
||||
|
assert(!transient); |
||||
|
return std::make_shared<ClockVariable>(name, variable); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,32 @@ |
|||||
|
#pragma once |
||||
|
|
||||
|
#include "storm/storage/jani/Variable.h" |
||||
|
|
||||
|
namespace storm { |
||||
|
namespace jani { |
||||
|
|
||||
|
class ClockVariable : public Variable { |
||||
|
public: |
||||
|
|
||||
|
/*! |
||||
|
* Creates a clock variable |
||||
|
*/ |
||||
|
ClockVariable(std::string const& name, storm::expressions::Variable const& variable); |
||||
|
|
||||
|
/*! |
||||
|
* Creates a clock variable with initial value |
||||
|
*/ |
||||
|
ClockVariable(std::string const& name, storm::expressions::Variable const& variable, storm::expressions::Expression const& initialValue, bool transient=false); |
||||
|
|
||||
|
virtual std::unique_ptr<Variable> clone() const override; |
||||
|
|
||||
|
virtual bool isClockVariable() const override; |
||||
|
}; |
||||
|
|
||||
|
/** |
||||
|
* Convenience function to call the appropriate constructor and return a shared pointer to the variable. |
||||
|
*/ |
||||
|
std::shared_ptr<ClockVariable> makeClockVariable(std::string const& name, storm::expressions::Variable const& variable, boost::optional<storm::expressions::Expression> initValue, bool transient); |
||||
|
|
||||
|
} |
||||
|
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue