diff --git a/src/storm-dft/parser/DFTGalileoParser.cpp b/src/storm-dft/parser/DFTGalileoParser.cpp index ec0b446d9..f872f4526 100644 --- a/src/storm-dft/parser/DFTGalileoParser.cpp +++ b/src/storm-dft/parser/DFTGalileoParser.cpp @@ -110,8 +110,16 @@ namespace storm { success = builder.addVotElement(name, threshold, childNames); } else if (tokens[1] == "pand") { success = builder.addPandElement(name, childNames); + } else if (tokens[1] == "pand-inc") { + success = builder.addPandElement(name, childNames, true); + } else if (tokens[1] == "pand-ex") { + success = builder.addPandElement(name, childNames, false); } else if (tokens[1] == "por") { success = builder.addPorElement(name, childNames); + } else if (tokens[1] == "por-ex") { + success = builder.addPorElement(name, childNames, false); + } else if (tokens[1] == "por-inc") { + success = builder.addPorElement(name, childNames, true); } else if (tokens[1] == "wsp" || tokens[1] == "csp") { success = builder.addSpareElement(name, childNames); } else if (tokens[1] == "seq") { diff --git a/src/storm-dft/storage/dft/DFTBuilder.h b/src/storm-dft/storage/dft/DFTBuilder.h index 55c1cb588..fbec0943e 100644 --- a/src/storm-dft/storage/dft/DFTBuilder.h +++ b/src/storm-dft/storage/dft/DFTBuilder.h @@ -53,6 +53,7 @@ namespace storm { bool addPandElement(std::string const& name, std::vector const& children, bool inclusive) { bool tmpDefault = pandDefaultInclusive; + pandDefaultInclusive = inclusive; bool result = addStandardGate(name, children, DFTElementType::PAND); pandDefaultInclusive = tmpDefault; return result; @@ -62,6 +63,14 @@ namespace storm { return addStandardGate(name, children, DFTElementType::POR); } + bool addPorElement(std::string const& name, std::vector const& children, bool inclusive) { + bool tmpDefault = porDefaultInclusive; + porDefaultInclusive = inclusive; + bool result = addStandardGate(name, children, DFTElementType::POR); + pandDefaultInclusive = tmpDefault; + return result; + } + bool addSpareElement(std::string const& name, std::vector const& children) { return addStandardGate(name, children, DFTElementType::SPARE); } diff --git a/src/storm-dft/storage/dft/elements/DFTPand.h b/src/storm-dft/storage/dft/elements/DFTPand.h index d89e357b1..8e5e2716a 100644 --- a/src/storm-dft/storage/dft/elements/DFTPand.h +++ b/src/storm-dft/storage/dft/elements/DFTPand.h @@ -50,7 +50,11 @@ namespace storm { } std::string typestring() const override { - return "PAND" + inclusive ? "" : "-ex"; + if (inclusive) { + return "PAND-inc"; + } else { + return "PAND-ex"; + } } protected: bool inclusive; diff --git a/src/storm-dft/storage/dft/elements/DFTPor.h b/src/storm-dft/storage/dft/elements/DFTPor.h index 3adaf16fc..565b5dacd 100644 --- a/src/storm-dft/storage/dft/elements/DFTPor.h +++ b/src/storm-dft/storage/dft/elements/DFTPor.h @@ -42,10 +42,15 @@ namespace storm { } std::string typestring() const override { - return "POR" + inclusive ? "" : "-ex"; + if (inclusive) { + return "POR-inc"; + } else { + return "POR-ex"; + } + } - bool isInclusive() { + bool isInclusive() const { return inclusive; } protected: