Clarification / updated code for Sheet 4

Moderator: Automated Software Engineering

Benutzeravatar
ericbodden
Sonntagsinformatiker
Sonntagsinformatiker
Beiträge: 243
Registriert: 5. Apr 2010 19:06

Clarification / updated code for Sheet 4

Beitrag von ericbodden » 1. Dez 2011 15:03

Dear all,

it was brought to my attention that there was a problem with the current version of MOPBox with respect to Sheet 4: it was very much impossible to access the automaton structure from the IndexingStrategy. This was mainly because the method initialState() in AbstractFSMMonitorTemplate was private. I have updated the code to make this method protected.

In addition, I have added a class OpenFSMMonitorTemplate, which subclasses AbstractFSMMonitorTemplate, and adds a convenient method for accessing all states in the automaton.

As a third change, I have added a constructor to SymbolBasedIndexing that uses this new class OpenFSMMonitorTemplate to determine the self-loops in the automaton. This should help you to get started more easily.

The classes in the packages competition.monitortemplates and competition.yourmonitortemplates were updated to be subclasses of OpenFSMMonitorTemplate.

Let me know in case there are additional problems with extending MOPBox.

Best wishes,
Eric
-- Eric

Benutzeravatar
ericbodden
Sonntagsinformatiker
Sonntagsinformatiker
Beiträge: 243
Registriert: 5. Apr 2010 19:06

Re: Clarification / updated code for Sheet 4

Beitrag von ericbodden » 1. Dez 2011 17:35

In addition, I have now committed a change to AbstractFSMMonitor.java, adding an accessor method to the monitor's current state. You will very likely need this.
-- Eric

Acly
Neuling
Neuling
Beiträge: 1
Registriert: 9. Dez 2011 21:41

Re: Clarification / updated code for Sheet 4

Beitrag von Acly » 9. Dez 2011 21:59

Hi,

the fact that the SymbolBasedIndexing class constructor now only takes an OpenFSMMonitorTemplate as argument seems to break the test cases (the ones in the test folder). The monitor templates used there (derived from AbstractFSMMonitorTestTemplate) are not a OpenFSMMonitorTemplate, thus the test suite cannot instantiate the SymbolBasedIndexing strategy.

As a workaround changing the AbstractFSMMonitorTestTemplate class to inherit from OpenFSMMonitorTemplate instead seems to work.

- Niko

Benutzeravatar
ericbodden
Sonntagsinformatiker
Sonntagsinformatiker
Beiträge: 243
Registriert: 5. Apr 2010 19:06

Re: Clarification / updated code for Sheet 4

Beitrag von ericbodden » 11. Dez 2011 12:32

Thanks for this hint Niko.

Indeed I did not double-check the test cases.
-- Eric

Antworten

Zurück zu „Automated Software Engineering“