assertion for in_state_reaction in orthogonal state
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi people, I hope you still there, mailing list isn't exactly active. I get an assertion using visualizer when there is in_state_reaction in orthogonal state. test.cpp: #include <stdio.h> #include <boost/statechart/event.hpp> #include <boost/statechart/state_machine.hpp> #include <boost/statechart/simple_state.hpp> #include <boost/statechart/transition.hpp> #include <boost/statechart/in_state_reaction.hpp> namespace sc = boost::statechart; namespace mpl = boost::mpl; struct Active; struct Keyboard: sc::state_machine<Keyboard, Active> { }; struct EvSome: sc::event<EvSome>{}; struct NumLockOff; struct CapsLockOff; struct Active: sc::simple_state<Active, Keyboard, mpl::list<NumLockOff, CapsLockOff> > { void somefunction(const EvSome&) { printf("Some function\n"); } }; struct NumLockOff: sc::simple_state<NumLockOff, Active::orthogonal<0> > { typedef mpl::list<> reactions; }; struct CapsLockOff: sc::simple_state<CapsLockOff, Active::orthogonal<1> > { typedef sc::in_state_reaction<EvSome, Active, &Active::somefunction> reactions; }; int main() { Keyboard a; a.initiate(); a.process_event(EvSome()); return 0; }
clang++ -Xclang -load -Xclang /home/slava/install/sources/boost-statechart-viewer/src/visualizer.so -Xclang -plugin -Xclang visualize-statechart test.cpp ... clang: visualizer.cpp:420: void Visitor::HandleReaction(const clang::Type*, clang::SourceLocation, clang::CXXRecordDecl*): Assertion `s' failed.
Any advice how to proceed? With best regards, Slava -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJSV6c7AAoJEMqmnBSIOo9RKYQP/1B5Rks/xOhb/DhJVeqq0H2V 7Z5WhkLykXTvrB/IXF+q+X0jxtfybJhjB66zidEmlS7sUUc9je2rtneTF4kHTn96 NaRKv+VbviFpgwBk7I/6GE3yRKhaWoHAsFQAqCP3WBavAVMXvfetVDPnafRPcz6k Zha8G02SygYj1mv498X8YtIwCbUC9mYnOvx+sQnBRgzi77mQnq7ISLQlXEhkqfso 6KfIkJQkb6dXEjCyaMaOkj8liLCRBvlS2288d4JDMgkPtJJr07arJAecK8dnn++f OBATgIJSCYB5LzaKo+FcL3MDvXZSKjfztTrt0608X/L/wlrv6LQBMPQdjekQVBOj I8YSTFwx3q5hV706QKYnu/EFxA8w6sHX1y9qfo0PX1fncXnAKLdwtB2bqPe6u/Te i8N7GPSV1/nyp5xJ8mI9EO81Punxxxrhpua5+DrvQCGlhTqAUXI2z7HfCpJ5Yi3b LyNu0Fm2UnyGefSz8PwZJZhLQcZSQzPSBtIvtYwJkpJE9XFOxLRBBRgYo8mhtJE4 9HKPoD6MWSkAemk3yH2G+AjnCmI6iXyaPAd2MedIwcnuxSuLlhJsd65u8ZSENN08 3KyDT2UZTAhrRcOj2+8MV0e4W+Lryj+v4Op1+kpBAYJQ0RpA3fnnxiI9e7WVBBl8 TsDXJkkq9pbydnc9U1xe =D+WL -----END PGP SIGNATURE-----
Hi Slava, On Fri, Oct 11 2013, Viatcheslav.Sysoltsev wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi people,
I hope you still there, mailing list isn't exactly active.
Yes, we're still here :)
I get an assertion using visualizer when there is in_state_reaction in orthogonal state.
test.cpp:
#include <stdio.h> #include <boost/statechart/event.hpp> #include <boost/statechart/state_machine.hpp> #include <boost/statechart/simple_state.hpp> #include <boost/statechart/transition.hpp> #include <boost/statechart/in_state_reaction.hpp>
namespace sc = boost::statechart; namespace mpl = boost::mpl;
struct Active; struct Keyboard: sc::state_machine<Keyboard, Active> { };
struct EvSome: sc::event<EvSome>{};
struct NumLockOff; struct CapsLockOff;
struct Active: sc::simple_state<Active, Keyboard, mpl::list<NumLockOff, CapsLockOff> > { void somefunction(const EvSome&) { printf("Some function\n"); } };
struct NumLockOff: sc::simple_state<NumLockOff, Active::orthogonal<0> > { typedef mpl::list<> reactions; };
struct CapsLockOff: sc::simple_state<CapsLockOff, Active::orthogonal<1> > { typedef sc::in_state_reaction<EvSome, Active, &Active::somefunction> reactions; };
int main() { Keyboard a; a.initiate(); a.process_event(EvSome()); return 0; }
clang++ -Xclang -load -Xclang /home/slava/install/sources/boost-statechart-viewer/src/visualizer.so -Xclang -plugin -Xclang visualize-statechart test.cpp ... clang: visualizer.cpp:420: void Visitor::HandleReaction(const clang::Type*, clang::SourceLocation, clang::CXXRecordDecl*): Assertion `s' failed.
Any advice how to proceed?
I've looked into this and orthogonal states are not yet properly supported. It would be necessary to modify handleSimpleState() to handle mpl::list<> as initial state and modify the state machine model to support multiple initial states. I've tried to do this but I'd need more time, which I don't have right now. If you want to help here, I will support you. Best regards, -Michal
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Michal On 14.10.2013 19:30, Michal Sojka wrote:
Hi Slava,
I've looked into this and orthogonal states are not yet properly supported. It would be necessary to modify handleSimpleState() to handle mpl::list<> as initial state and modify the state machine model to support multiple initial states. I've tried to do this but I'd need more time, which I don't have right now. If you want to help here, I will support you.
Best regards, -Michal
Tried to hack on this, but get lost in clang AST traverse... I have to give up now, maybe return to it later. I let you know if I get some results. Regards, Slava -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJSXQSuAAoJEMqmnBSIOo9REJ8QAIyuX9OnZTc5j3/Y41eGki2R qZUomRwRvHjEErY0MMdtwLJDdhlgvrEDvyYPSzL8727VmKU748wZLVDDmq5EEZw6 NX4d0gkKzwOf6d4I3UGmWEUYUtoXJwhH76jnHzki9AP84ohZOTEpYvB66GmEHqrN 69/zf1uEHAjcX7IWB2XvpSsbMJ9Nnl9GdJaUDmyFXcD1AdX+yBGS6mC0rt8OBUjP 5IVUYWy+XZz8e93tHpvH6E6Ei5RPfwA0CvpOvk11KOiqHZQUEEEen7KERkdSmpLM CqZHEdDGLM/w6ba4zOJGwbz6XjGv8L4VmzpvssMa8bZshz1c42DC7xh88QHA2vmY 1/2X6cnB9upjMgjh8likldNIS7SL00NScL6XPbe8stR/Y3dm9cophFGrSgoSAFMI 4bfFsMbrhjWrloRXnfi896SwCP0smnz1QB+Rj5Lxafi0+YQYWtlR/goOL2GFxgZ5 SF0Ow7uP1PbAwgIrzTw1SZ+Kj7AtO2QSSUVIepCYVTI4pMwcZCQfGuux5JuWstXB DBSFIbFzqCsbw3DSSJk9jXdvK2o1RTC3O+RZhYYGhF4LvWPlb8UBWVBvIoT2+uLB fiuvvWg5ghHA/w5EqUOR1tyzCWAiEbkL2SwFLQoisub/n5gWatnUXPjLv2LzUINY MsRSFVLpXetQ/NyCEdxK =fFsq -----END PGP SIGNATURE-----
On Tue, Oct 15 2013, Viatcheslav.Sysoltsev wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi Michal
On 14.10.2013 19:30, Michal Sojka wrote:
Hi Slava,
I've looked into this and orthogonal states are not yet properly supported. It would be necessary to modify handleSimpleState() to handle mpl::list<> as initial state and modify the state machine model to support multiple initial states. I've tried to do this but I'd need more time, which I don't have right now. If you want to help here, I will support you.
Best regards, -Michal
Tried to hack on this, but get lost in clang AST traverse... I have to give up now, maybe return to it later. I let you know if I get some results.
Yes, that happend in my case as well :) Thanks, -Michal
participants (2)
-
Michal Sojka
-
Viatcheslav.Sysoltsev