kanje / bosce

boost::statechart extractor
Boost Software License 1.0
26 stars 4 forks source link

Handle finding statemachine after its initialstate better #3

Closed cpeltz closed 4 years ago

cpeltz commented 4 years ago

First commit just includes including the include directory of boost in the include path of cmake. If you have a boost installation which is not in the standard include path this is necessary.

Second commit handles the case when an initial state machine state is encountered and added before its state machine is encountered and added, which would cause the state machine to not be a child of the root note and have no initial state causing it to not be listed as a state machine and the state machine graph being disjointed as the initial state was empty.

cpeltz commented 4 years ago

Unfortunately I can not share the dump as it was from work, I might be able to build a striped down dump with only the necessary stuff and without the actual names in it to have a test file for this case.

kanje commented 4 years ago

I have managed to reproduce the issue! And removing the if resolves it. I have also added a regression test. You can run it with make test. It currently fails because I think you deserve to be the one to fix it :)

cpeltz commented 4 years ago

Oh, very nice indeed. Sorry for the slow reaction, I was on a customer visit this week and it turned out to be more work then expected. I'll have a look tomorrow to resolve this, thank you.

cpeltz commented 4 years ago

I remade my changes, how we discussed it and the test is now green : D Thanks for your support