Teaching Case — One Character, Every Direction Reversed
The same fuel system with a single `~` deleted from the pump's inlet. The connection list is byte-identical, the figure is pixel-identical, and every direction in the joint has reversed: `feed` is now `out` at both ends and `spill` is `in` at both, so there are two suppliers, two consumers and nothing transferable. This is the commonest error in hand-written SysML v2 and it is invisible at any zoom. Open it beside the template above.
Make it your own.
package FuelSystem {
item def Fuel;
port def MountPoint;
port def FuelPort {
out item feed : Fuel;
in item spill : Fuel;
}
interface def FuelLine {
end supplier : FuelPort;
end consumer : ~FuelPort;
}
part def Tank {
port outlet : FuelPort;
port fillPoint : ~FuelPort;
}
part def Pump {
// The defect, and the whole of it: this should read `~FuelPort`.
port inlet : FuelPort;
port outlet : FuelPort;
port base : MountPoint;
}
part def Engine {
port inlet : ~FuelPort;
port foot : MountPoint;
}
part def Vehicle {
port fill : ~FuelPort;
part tank : Tank;
part pump : Pump;
part engine : Engine;
interface tankToPump : FuelLine connect tank.outlet to pump.inlet;
interface pumpToEngine : FuelLine connect pump.outlet to engine.inlet;
connect pump.base to engine.foot;
flow of Fuel from fill.feed to tank.fillPoint.feed;
}
}