Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
JaniScopeChanger.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <optional>
5#include <vector>
6
8
9namespace storm {
10
11namespace expressions {
12class Variable;
13}
14
15namespace jani {
16
17class Model;
18class Property;
19
21 public:
22 JaniScopeChanger() = default;
23
28 void makeVariableGlobal(storm::expressions::Variable const& variable, Model& model) const;
29
34 void makeVariableLocal(storm::expressions::Variable const& variable, Model& model, uint64_t automatonIndex) const;
35
39 bool canMakeVariableGlobal(storm::expressions::Variable const& variable, Model const& model) const;
40
45 std::pair<bool, uint64_t> canMakeVariableLocal(storm::expressions::Variable const& variable, Model const& model,
46 storm::OptionalRef<std::vector<Property> const> properties = storm::NullRef,
47 std::optional<uint64_t> automatonIndex = std::nullopt) const;
48
52 void makeVariablesGlobal(Model& model) const;
53
57 void makeVariablesLocal(Model& model, storm::OptionalRef<std::vector<Property> const> properties = storm::NullRef) const;
58};
59} // namespace jani
60
61} // namespace storm
Helper class that optionally holds a reference to an object of type T.
Definition OptionalRef.h:48
void makeVariablesGlobal(Model &model) const
Moves as many variables to the global scope as possible.
void makeVariablesLocal(Model &model, storm::OptionalRef< std::vector< Property > const > properties=storm::NullRef) const
Moves as many variables to a local scope as possible.
void makeVariableGlobal(storm::expressions::Variable const &variable, Model &model) const
Moves the given variable to the global scope.
bool canMakeVariableGlobal(storm::expressions::Variable const &variable, Model const &model) const
Checks whether this variable can be made global without introducing name clashes.
void makeVariableLocal(storm::expressions::Variable const &variable, Model &model, uint64_t automatonIndex) const
Moves the given variable into the local scope of the automaton with the given index.
std::pair< bool, uint64_t > canMakeVariableLocal(storm::expressions::Variable const &variable, Model const &model, storm::OptionalRef< std::vector< Property > const > properties=storm::NullRef, std::optional< uint64_t > automatonIndex=std::nullopt) const
Checks whether this variable can be made local without introducing out-of-scope accesses.
LabParser.cpp.
Definition cli.cpp:18
constexpr NullRefType NullRef
Definition OptionalRef.h:31