Connect the feature model
- Recall the feature model and meta-model:
abstract xor trackLine
single
dual
abstract RegionalStationConf
parking_track ?
- Like in Part III, we now build a mapping model, but we are not so precise with presence conditions. Instead we specify general properties:
abstract MappingModel
- Let’s instantiate a station.
Task 15 - Investigate some legal stations in Clafer IDE. Stop at the first instance that is ‘weird’ (it should not take more than three instances):
Task 16
- Likely the first instance synthesized with this mapping model has to
sequentially connected straight tracks (otherwise convince yourself that
such an instance is feasible). In our rural stations we do not want to
have consecutively connected straight tracks (they do not make sense in
small stations). Add a constraint forbidding that to the
MappingModel
and see what other instances are synthesized then. Note that we do not want to add this constraint to the meta-model, as this would forbid larger stations to be created with this meta-model.
Notice that with these more relaxed meta-model we can now create stations that mixed dual and single tracks (the corresponding constraints have been dropped from the feature model).
Task 17
- Modify the model to admit blind stations (so it must be possible to have no outgoing tracks both in the feature model and in the solution space model). Synthesize the station in Rabka, by selecting the right feature model configuration using constraints in Clafer IDE.
The tutorial is completed. You can go back to the front page by clicking the logo in the top left corner.
Previous
Part I
Part II
Part III
Part IV