Sequence Chart Studio  svn HEAD revision
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
FifoChecker Class Reference

Checks the FIFO property of a MSC. More...

#include <fifo_checker.h>

Inheritance diagram for FifoChecker:
Inheritance graph
Collaboration diagram for FifoChecker:
Collaboration graph

Public Member Functions

virtual std::wstring get_property_name () const
virtual std::wstring get_help_filename () const
virtual PreconditionList get_preconditions (MscPtr msc) const
 Returns a list of preconditions for the check. More...
bool is_supported (ChannelMapperPtr chm)
std::list< BMscPtrcheck (BMscPtr bmsc, ChannelMapperPtr mapper)
void cleanup_attributes ()
void set_channel_id (Event *e, size_t id)
size_t get_channel_id (Event *e)
- Public Member Functions inherited from Checker
virtual ~Checker ()
- Public Member Functions inherited from Reporter
 Reporter ()
 Reporter (ReportPrinter *printer)
virtual ~Reporter ()
void set_printer (ReportPrinter *printer)
int print_report (TReportSeverity severity, const std::wstring &message)
- Public Member Functions inherited from BMscChecker
virtual ~BMscChecker ()
- Public Member Functions inherited from HMscReferenceChecker< FifoChecker >
std::list< HMscPtrcheck (HMscPtr hmsc, ChannelMapperPtr chm)
- Public Member Functions inherited from HMscChecker
virtual ~HMscChecker ()

Static Public Member Functions

static FifoCheckerPtr instance ()
static bool should_be_checked (Event *e)

Static Public Attributes

static const std::string channel_id_attribute = "fifo_channel_id"

Protected Member Functions

BMscPtr create_counter_example (BMscPtr &bmsc, MessageEvent *receive1, MessageEvent *receive2)
bool consistent_order (VisualClosureInitiator &initiator, Event *e1, Event *e2)
- Protected Member Functions inherited from HMscChecker
 HMscChecker ()

Protected Attributes

EventPStack m_modified_events

Static Protected Attributes

static FifoCheckerPtr m_instance
- Static Protected Attributes inherited from BMscChecker
static BMscCheckerPtr m_checker

Additional Inherited Members

- Public Types inherited from Checker
typedef std::vector
< PrerequisiteCheck
 List of properties that must be satisfied before executing the check. More...

Detailed Description

Checks the FIFO property of a MSC.

BMSC is FIFO if for all receive events c, d and their matching send events a, b it holds that c < d => a < b, where < is the visual order and the two messages belong to the same channel. HMSC is FIFO if all referenced BMSCs satisfy FIFO.

Definition at line 44 of file fifo_checker.h.

Member Function Documentation

std::list< BMscPtr > FifoChecker::check ( BMscPtr  bmsc,
ChannelMapperPtr  mapper 
void FifoChecker::cleanup_attributes ( )

Removes no more needed attributes.

Descendat of this class should remove attributes of MscElements that are no more needed. This method should be called after finish of algorithm.

Implements Checker.

Definition at line 85 of file fifo_checker.cpp.

References channel_id_attribute, m_modified_events, and MscElement::remove_attribute().

Referenced by check().

bool FifoChecker::consistent_order ( VisualClosureInitiator initiator,
Event e1,
Event e2 

Checks whether e1 and e2 (from equivalent channel) are in consistent order.

An e1 is supposed to be before e2. If this holds true is returned, false otherwise.

Definition at line 68 of file fifo_checker.h.

References VisualClosureInitiator::get_topology_index(), and VisualClosureInitiator::get_visual_closure().

BMscPtr FifoChecker::create_counter_example ( BMscPtr bmsc,
MessageEvent receive1,
MessageEvent receive2 
size_t FifoChecker::get_channel_id ( Event e)

Getter of channel id attribute of m.

Definition at line 141 of file fifo_checker.h.

References MscElement::get_attribute().

virtual std::wstring FifoChecker::get_help_filename ( ) const

Ralative path to a HTML file displayed as help.

Implements Checker.

Definition at line 87 of file fifo_checker.h.

Checker::PreconditionList FifoChecker::get_preconditions ( MscPtr  msc) const

Returns a list of preconditions for the check.

Implements Checker.

Definition at line 26 of file fifo_checker.cpp.

References PrerequisiteCheck::PP_REQUIRED, and result.

virtual std::wstring FifoChecker::get_property_name ( ) const

Human readable name of the property being checked.

Implements Checker.

Definition at line 81 of file fifo_checker.h.

static FifoCheckerPtr FifoChecker::instance ( )

Returns common instance of FifoChecker

Definition at line 123 of file fifo_checker.h.

bool FifoChecker::is_supported ( ChannelMapperPtr  chm)

Supports only SRChannelMapper and SRLChannelMapper

Implements Checker.

Definition at line 100 of file fifo_checker.h.

void FifoChecker::set_channel_id ( Event e,
size_t  id 

Setter of channel id attribute of message.

Definition at line 133 of file fifo_checker.h.

References MscElement::set_attribute().

static bool FifoChecker::should_be_checked ( Event e)

Determines whether event should be checked or not.

MessageEvent should be checked if it is receive event and has matching event.

Definition at line 151 of file fifo_checker.h.

References MessageEvent::is_matched(), and MessageEvent::is_receive().

Member Data Documentation

const std::string FifoChecker::channel_id_attribute = "fifo_channel_id"

Name of channel id attribute

Definition at line 95 of file fifo_checker.h.

Referenced by cleanup_attributes().

FifoCheckerPtr FifoChecker::m_instance

Common instance

Definition at line 53 of file fifo_checker.h.

EventPStack FifoChecker::m_modified_events

Events with modified dynamic attributes

Definition at line 58 of file fifo_checker.h.

Referenced by cleanup_attributes().

The documentation for this class was generated from the following files: Logo
Generated on Fri Jan 15 2016 16:26:58 for Sequence Chart Studio by  doxygen