[msm]intarnal_transition_table's behavior

Hello, When I was trying to answer an another thread, I encountered strange behavior. (Re: [boost] [msm]exit pseudo state and event) See 18_InternalTransitionTableTest.cpp. (attached file) I believe that internal_transition_table should work correctly without transition_table. Here is internal_transition_table. // Internal Transition table struct internal_transition_table : mpl::vector< // Event Action Guard msmf::Internal < Event1, Action1_1 ,Guard1_1 >
{};
But Event1 isn't dispatched. I don't understand why. When I add transition_table that includes the Event1, internal_transition_table works correctly. #if 1 // Why is it needed? // Transition table struct transition_table:mpl::vector< // Start Event Next Action Guard msmf::Row < State1_1, Event1, State1_2, msmf::none, msmf::none > // OK // msmf::Row < State1_1, Event2, State1_2, msmf::none, msmf::none > // NG > {}; #endif But if transition_table don't have Event1, internal_transition_table doesn't work correctly. msmf::Row < State1_1, Event2, State1_2, msmf::none, msmf::none > // NG I suspect it is bug. How do you think? Thanks, Takatoshi

Hello,
When I was trying to answer an another thread, I encountered strange behavior. (Re: [boost] [msm]exit pseudo state and event)
See 18_InternalTransitionTableTest.cpp. (attached file)
I believe that internal_transition_table should work correctly without transition_table.
Here is internal_transition_table.
// Internal Transition table struct internal_transition_table : mpl::vector< // Event Action Guard msmf::Internal < Event1, Action1_1 ,Guard1_1 >
{};
But Event1 isn't dispatched. I don't understand why.
When I add transition_table that includes the Event1, internal_transition_table works correctly.
#if 1 // Why is it needed? // Transition table struct transition_table:mpl::vector< // Start Event Next Action Guard msmf::Row < State1_1, Event1, State1_2, msmf::none, msmf::none > // OK // msmf::Row < State1_1, Event2, State1_2, msmf::none, msmf::none
// NG {}; #endif
But if transition_table don't have Event1, internal_transition_table doesn't work correctly.
msmf::Row < State1_1, Event2, State1_2, msmf::none, msmf::none > // NG
I suspect it is bug. How do you think?
Thanks, Takatoshi
Hi Takatoshi, you're right, it's a bug. I just fixed it in the trunk (rev. 73289). Thanks for the report, Christophe PS: I'm in vacations from next week for 4 weeks, so I might be less responsive as I will have a pretty bad connection.

Hi, Christophe On Thu, 21 Jul 2011 22:34:15 +0200 "Christophe Henry" <christophe.j.henry@googlemail.com> wrote:
Hello,
When I was trying to answer an another thread, I encountered strange behavior. (Re: [boost] [msm]exit pseudo state and event)
See 18_InternalTransitionTableTest.cpp. (attached file)
I believe that internal_transition_table should work correctly without transition_table.
Here is internal_transition_table.
// Internal Transition table struct internal_transition_table : mpl::vector< // Event Action Guard msmf::Internal < Event1, Action1_1 ,Guard1_1 >
{};
But Event1 isn't dispatched. I don't understand why.
When I add transition_table that includes the Event1, internal_transition_table works correctly.
#if 1 // Why is it needed? // Transition table struct transition_table:mpl::vector< // Start Event Next Action Guard msmf::Row < State1_1, Event1, State1_2, msmf::none, msmf::none > // OK // msmf::Row < State1_1, Event2, State1_2, msmf::none, msmf::none
// NG {}; #endif
But if transition_table don't have Event1, internal_transition_table doesn't work correctly.
msmf::Row < State1_1, Event2, State1_2, msmf::none, msmf::none > // NG
I suspect it is bug. How do you think?
Thanks, Takatoshi
Hi Takatoshi,
you're right, it's a bug. I just fixed it in the trunk (rev. 73289).
I double checked it. It works correctly. Thanks for fixing bug quickly.
Thanks for the report, Christophe
PS: I'm in vacations from next week for 4 weeks, so I might be less responsive as I will have a pretty bad connection.
Enjoy your vacation! :) Regards, Takatoshi

Hi, Christophe I found an another strange behavior on trunk. On Fri, Jul 22, 2011 at 8:58 AM, Takatoshi Kondo <kondo@t.email.ne.jp> wrote:
Hi, Christophe
On Thu, 21 Jul 2011 22:34:15 +0200 "Christophe Henry" <christophe.j.henry@googlemail.com> wrote:
Hello,
When I was trying to answer an another thread, I encountered strange behavior. (Re: [boost] [msm]exit pseudo state and event)
See 18_InternalTransitionTableTest.cpp. (attached file)
I believe that internal_transition_table should work correctly without transition_table.
Here is internal_transition_table.
// Internal Transition table struct internal_transition_table : mpl::vector< // Event Action Guard msmf::Internal < Event1, Action1_1 ,Guard1_1 >
{};
But Event1 isn't dispatched. I don't understand why.
When I add transition_table that includes the Event1, internal_transition_table works correctly.
#if 1 // Why is it needed? // Transition table struct transition_table:mpl::vector< // Start Event Next Action Guard msmf::Row < State1_1, Event1, State1_2, msmf::none, msmf::none > // OK // msmf::Row < State1_1, Event2, State1_2, msmf::none, msmf::none > // NG > {}; #endif
But if transition_table don't have Event1, internal_transition_table doesn't work correctly.
msmf::Row < State1_1, Event2, State1_2, msmf::none, msmf::none > // NG
I suspect it is bug. How do you think?
Thanks, Takatoshi
Hi Takatoshi,
you're right, it's a bug. I just fixed it in the trunk (rev. 73289).
I double checked it. It works correctly. Thanks for fixing bug quickly.
When I executed 21_InternalTransitionEval.cpp (attached file), the most internal transition's guards are evaluated twice on trunk Rev:73289.
Send Event1 Guard1_1_2 Guard1_1_1 Guard1_2 Guard1_1 Guard1_1_2 <= called again Guard1_1_1 <= called again Guard2 Guard1
But on Boost 1.47.0, they are called only once.
Send Event1 Guard1_1_2 Guard1_1_1 Guard1_2 Guard1_1 Guard2 Guard1
I believe version 1.47.0 is correct. I think this changing behavior is something concerned with your fix. And I also checked on Rev:72879 is same behavior as 1.47.0. Could you check it?
Thanks for the report, Christophe
PS: I'm in vacations from next week for 4 weeks, so I might be less responsive as I will have a pretty bad connection.
Enjoy your vacation! :)
Regards, Takatoshi
Thanks, Takatoshi

Hi, Christophe
I found an another strange behavior on trunk.
When I executed 21_InternalTransitionEval.cpp (attached file), the most internal transition's guards are evaluated twice on trunk Rev:73289.
Send Event1 Guard1_1_2 Guard1_1_1 Guard1_2 Guard1_1 Guard1_1_2 <= called again Guard1_1_1 <= called again Guard2 Guard1
But on Boost 1.47.0, they are called only once.
Send Event1 Guard1_1_2 Guard1_1_1 Guard1_2 Guard1_1 Guard2 Guard1
I believe version 1.47.0 is correct.
I think this changing behavior is something concerned with your fix. And I also checked on Rev:72879 is same behavior as 1.47.0.
Could you check it?
Hi Takatoshi, yes it's definitely a bug :( My fix was not completely correct. I gave it another try (rev. 74046). I unfortunately have right now some... ehm disagreement with my Visual Studio so I didn't run my full tests but I think it must now be correct. Could you give it a try? Thanks, Christophe

Welcome back! Christophe, On Wed, 24 Aug 2011 22:50:05 +0200 "Christophe Henry" <christophe.j.henry@googlemail.com> wrote:
Hi Takatoshi,
yes it's definitely a bug :( My fix was not completely correct. I gave it another try (rev. 74046). I unfortunately have right now some... ehm disagreement with my Visual Studio so I didn't run my full tests but I think it must now be correct. Could you give it a try?
Of course. I checked it on my VC9(Visual Studio 2008 Version 9.0.30729.1 SP). My testcode returned correct result like below.
Guard1_1_2 Guard1_1_1 Guard1_2 Guard1_1 Guard2 Guard1
And I also examined msm/test using b2.exe. The all tests were passed successfully. BTW, could you check the below mail when you have time. Re: [boost] [msm]exit pseudo state and event Message-Id: <20110729175149.02B6.2E9C2B58@t.email.ne.jp>
Thanks, Christophe
Regards, Takatoshi

Welcome back! Christophe,
thanks :)
On Wed, 24 Aug 2011 22:50:05 +0200 "Christophe Henry" <christophe.j.henry@googlemail.com> wrote:
Hi Takatoshi,
yes it's definitely a bug :( My fix was not completely correct. I gave it another try (rev. 74046). I unfortunately have right now some... ehm disagreement with my Visual Studio so I didn't run my full tests but I think it must now be correct. Could you give it a try?
Of course. I checked it on my VC9(Visual Studio 2008 Version 9.0.30729.1 SP).
My testcode returned correct result like below.
Guard1_1_2 Guard1_1_1 Guard1_2 Guard1_1 Guard2 Guard1
And I also examined msm/test using b2.exe. The all tests were passed successfully.
Great!
BTW, could you check the below mail when you have time. Re: [boost] [msm]exit pseudo state and event Message-Id: <20110729175149.02B6.2E9C2B58@t.email.ne.jp>
Sure, but it'll take a few days because I need to catch back on my msm work. Regards, Christophe
participants (3)
-
Christophe Henry
-
Takatoshi Kondo
-
Takatoshi Kondo