Start start {}

Exec edit {
    name = "models/CBD/edit"
}

Exec toRuntime {
    name = "models/CBD/toRuntime"
}

Exec restartSim {
    name = "models/CBD/restartSim"
}

Exec simulate {
    name = "models/CBD/simulate"
}

Exec merge {
    name = "models/CBD/merge"
}

Fork fork1 {}
Fork fork2 {}

Data design_model {
    name = "design_model"
    type = "formalisms/CBD/Design_MM"
}

Data partial_runtime_model {
    name = "partial_runtime_model"
    type = "formalisms/CBD/PartialRuntime_MM"
}

Data full_runtime_model {
    name = "full_runtime_model"
    type = "formalisms/CBD/FullRuntime_MM"
}

Next (start, fork1) {}
Next (fork1, edit) {}
Next (fork1, simulate) {}
Next (edit, toRuntime) {}
Next (toRuntime, fork2) {}
Next (fork2, edit) {}
Next (fork2, restartSim) {}
Next (simulate, merge) {}
Next (merge, simulate) {}

Consumes (edit, design_model) {
    name = "DesignModel"
}
Produces (edit, design_model) {
    name = "DesignModel"
}

Consumes (toRuntime, design_model) {
    name = "DesignModel"
}
Produces (toRuntime, partial_runtime_model) {
    name = "PartialRuntimeModel"
}

Consumes (merge, partial_runtime_model) {
    name = "PartialRuntimeModel"
}
Produces (merge, full_runtime_model) {
    name = "FullRuntimeModel"
}

Consumes (simulate, full_runtime_model) {
    name = "FullRuntimeModel"
}
Produces (simulate, full_runtime_model) {
    name = "FullRuntimeModel"
}
