Menu

#230 Latest generator breaks all Default class transitions

SMC 7.3.0
closed-fixed
9
2021-11-11
2021-10-04
No

Hello, I have faced an issue generating C code with latest Smc.jar (7_2_0). Code generated for transations in Default state is always ending with line:

    AppClassState_Default(fsm);

This leads to assertation fail on most of transitions in Default state.
For example, I have compiled EX3 and got the following generated code:

static void StartMap_DefaultState_Unknown(struct AppClassContext *const fsm)
{

    if (getDebugFlag(fsm) != 0) {
        TRACE("LEAVING STATE   : StartMap_DefaultState)\n");
    }
    if (getDebugFlag(fsm) != 0) {
        TRACE("ENTER TRANSITION: StartMap_&StartMap_DefaultState.Unknown()\n");
    }
    if (getDebugFlag(fsm) != 0) {
        TRACE("EXIT TRANSITION : StartMap_&StartMap_DefaultState.Unknown()\n");
    }
    setState(fsm, &StartMap_Unacceptable);

    AppClassState_Default(fsm);
}

Attaching AppClass_sm.c and AppClass_sm.h, may be it would help you to fix this.

2 Attachments

Discussion

  • Nikita Ivanov

    Nikita Ivanov - 2021-10-04

    For example, the same transition generated with Smc.jar from 7.0.0:

    static void StartMap_DefaultState_Unknown(struct AppClassContext *const fsm)
    {
    
        if (getDebugFlag(fsm) != 0) {
            TRACE("LEAVING STATE   : StartMap_DefaultState)\n");
        }
        if (getDebugFlag(fsm) != 0) {
            TRACE("ENTER TRANSITION: StartMap_&StartMap_DefaultState.Unknown()\n");
        }
        if (getDebugFlag(fsm) != 0) {
            TRACE("EXIT TRANSITION : StartMap_&StartMap_DefaultState.Unknown()\n");
        }
        setState(fsm, &StartMap_Unacceptable);
    }
    
     
  • Charles Rapp

    Charles Rapp - 2021-10-31
    • status: open --> open-accepted
    • assigned_to: Charles Rapp
     
  • Charles Rapp

    Charles Rapp - 2021-11-11
    • Group: Assigned --> SMC 7.3.0
     
  • Charles Rapp

    Charles Rapp - 2021-11-11
    • status: open-accepted --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB