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

#include <race_checker.h>

Inheritance diagram for RaceChecker:
Inheritance graph
Collaboration diagram for RaceChecker:
Collaboration graph

Public Member Functions

 RaceChecker ()
 
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...
 
std::list< BMscPtrcheck_bmsc (BMscPtr bmsc, ChannelMapperPtr mapper)
 
std::list< BMscPtrcheck (BMscPtr bmsc, ChannelMapperPtr mapper)
 
std::list< HMscPtrcheck (HMscPtr hmsc, ChannelMapperPtr mapper)
 
void cleanup_attributes ()
 
bool is_supported (ChannelMapperPtr chm)
 
bool check_events (Event *e1, Event *e2)
 
- 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 HMscChecker
virtual ~HMscChecker ()
 

Protected Member Functions

std::list< HMscPtrcheck_bmscs (HMscPtr hmsc, ChannelMapperPtr mapper)
 
BMscPtr create_counter_example (Event *e1, Event *e2)
 
HMscPtr create_counter_example (RaceInHMscException e)
 
void prepare_hmsc (HMscPtr hmsc, ChannelMapperPtr mapper)
 
void check_concatenation (const Footprint &f, BMscPtr bmsc, ChannelMapperPtr mapper)
 
std::list< HMscPtrcreate_counter_example (const MscElementPListList &path, std::list< BMscPtr > examples)
 
std::list< HMscPtrcheck_hmsc (HMscPtr hmsc, ChannelMapperPtr mapper)
 
- Protected Member Functions inherited from HMscChecker
 HMscChecker ()
 

Protected Attributes

VisualClosureInitiator m_visual_initiator
 
CausalClosureInitiator m_causal_initiator
 
InstanceIdMarker m_instance_marker
 
MinimalEventsInitiator m_min_events_initiator
 
MaximalEventsInitiator m_max_events_initiator
 
BMscGraphDuplicator m_graph_duplicator
 

Additional Inherited Members

- Public Types inherited from Checker
typedef std::vector
< PrerequisiteCheck
PreconditionList
 List of properties that must be satisfied before executing the check. More...
 
- Static Protected Attributes inherited from BMscChecker
static BMscCheckerPtr m_checker
 

Detailed Description

Definition at line 224 of file race_checker.h.

Constructor & Destructor Documentation

RaceChecker::RaceChecker ( )

Member Function Documentation

std::list< BMscPtr > RaceChecker::check ( BMscPtr  bmsc,
ChannelMapperPtr  mapper 
)
virtual

Checks BMsc against specific property.

Returns a list of BMscPtr with violating examples if there are any in bmsc otherwise the list is empty.

Parameters
bmsc- BMsc to be checked
mapper- ChannelMapper which is chosen as delivery semantic

Implements BMscChecker.

Definition at line 329 of file race_checker.cpp.

References check_bmsc(), cleanup_attributes(), and result.

std::list< HMscPtr > RaceChecker::check ( HMscPtr  hmsc,
ChannelMapperPtr  mapper 
)
virtual

Checks HMsc against specific property.

Returns a list of MscPathPtr with violating examples if there are any in hmsc otherwise the list is empty.

Parameters
hmsc- HMsc to be checked
mapper- ChannelMapper which is chosen as delivery semantic

Implements HMscChecker.

Definition at line 364 of file race_checker.cpp.

References DFSListenersContainer::add_white_node_found_listener(), check_bmscs(), check_hmsc(), Duplicator::cleanup_attributes(), cleanup_attributes(), BMscGraphDuplicator::duplicate_hmsc(), m_graph_duplicator, prepare_hmsc(), DFSListenersContainer::remove_all_listeners(), PostProcess::reset(), and DFSBMscGraphTraverser::traverse().

std::list< BMscPtr > RaceChecker::check_bmsc ( BMscPtr  bmsc,
ChannelMapperPtr  mapper 
)
std::list< HMscPtr > RaceChecker::check_bmscs ( HMscPtr  hmsc,
ChannelMapperPtr  mapper 
)
protected
void RaceChecker::check_concatenation ( const Footprint f,
BMscPtr  bmsc,
ChannelMapperPtr  mapper 
)
protected

Coorrespond to Algorithm 1 of referenced article

bool RaceChecker::check_events ( Event e1,
Event e2 
)
std::list< HMscPtr > RaceChecker::check_hmsc ( HMscPtr  hmsc,
ChannelMapperPtr  mapper 
)
protected
void RaceChecker::cleanup_attributes ( )
virtual

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 337 of file race_checker.cpp.

References InstanceIdMarker::cleanup_attributes(), MinimalEventsInitiator::cleanup_attributes(), Duplicator::cleanup_attributes(), CausalClosureInitiator::cleanup_attributes(), MaximalEventsInitiator::cleanup_attributes(), VisualClosureInitiator::cleanup_attributes(), m_causal_initiator, m_graph_duplicator, m_instance_marker, m_max_events_initiator, m_min_events_initiator, and m_visual_initiator.

Referenced by check().

BMscPtr RaceChecker::create_counter_example ( Event e1,
Event e2 
)
protected
HMscPtr RaceChecker::create_counter_example ( RaceInHMscException  e)
protected
std::list< HMscPtr > RaceChecker::create_counter_example ( const MscElementPListList path,
std::list< BMscPtr examples 
)
protected

Creates counter example in case there is any race violating BMsc

Definition at line 460 of file race_checker.cpp.

References Duplicator::cleanup_attributes(), HMscFlatPathDuplicator::duplicate_path(), Duplicator::get_copy(), result, MscElement::set_marked(), and ReferenceNode::set_msc().

virtual std::wstring RaceChecker::get_help_filename ( ) const
inlinevirtual

Ralative path to a HTML file displayed as help.

Implements Checker.

Definition at line 287 of file race_checker.h.

Checker::PreconditionList RaceChecker::get_preconditions ( MscPtr  msc) const
virtual

Returns a list of preconditions for the check.

Implements Checker.

Definition at line 251 of file race_checker.cpp.

References PrerequisiteCheck::PP_REQUIRED, and result.

virtual std::wstring RaceChecker::get_property_name ( ) const
inlinevirtual

Human readable name of the property being checked.

Implements Checker.

Definition at line 281 of file race_checker.h.

bool RaceChecker::is_supported ( ChannelMapperPtr  chm)
inlinevirtual

Checks whether Checker supports given ChannelMapper.

Deafult behaviour is false for all mappers, but it is neccessary to check out this behaviour in individual checkers.

Implements Checker.

Definition at line 300 of file race_checker.h.

void RaceChecker::prepare_hmsc ( HMscPtr  hmsc,
ChannelMapperPtr  mapper 
)
protected

Member Data Documentation

CausalClosureInitiator RaceChecker::m_causal_initiator
protected

Definition at line 231 of file race_checker.h.

Referenced by check_bmsc(), check_events(), cleanup_attributes(), and RaceChecker().

BMscGraphDuplicator RaceChecker::m_graph_duplicator
protected

Definition at line 239 of file race_checker.h.

Referenced by check(), and cleanup_attributes().

InstanceIdMarker RaceChecker::m_instance_marker
protected

Definition at line 233 of file race_checker.h.

Referenced by check_hmsc(), cleanup_attributes(), prepare_hmsc(), and RaceChecker().

MaximalEventsInitiator RaceChecker::m_max_events_initiator
protected

Definition at line 237 of file race_checker.h.

Referenced by check_hmsc(), cleanup_attributes(), prepare_hmsc(), and RaceChecker().

MinimalEventsInitiator RaceChecker::m_min_events_initiator
protected

Definition at line 235 of file race_checker.h.

Referenced by check_hmsc(), cleanup_attributes(), prepare_hmsc(), and RaceChecker().

VisualClosureInitiator RaceChecker::m_visual_initiator
protected

Definition at line 229 of file race_checker.h.

Referenced by check_bmsc(), check_events(), cleanup_attributes(), and RaceChecker().


The documentation for this class was generated from the following files:

SourceForge.net Logo
Generated on Fri Jan 15 2016 16:26:59 for Sequence Chart Studio by  doxygen