The game of chess is well-known and widely played all over the world. However, the rules for playing it are rather complex since there are different types of pieces and the ways they are allowed to move depend upon the type of the piece. In this paper we discuss alternative paradigms that can be used for modelling the rule of the chess game using VDM++ and show what we believe is the best model. It is also illustrated how this model can be connected to a standard textual notation for the moves in a chess game. This can be used to combine the formal model to a more convenient interface.
翻译:国际象棋是一款众所周知并在世界范围内广泛玩耍的游戏。然而,由于棋子有不同的类型,而它们被允许移动的方式依赖于棋子的类型,因此玩棋的规则相当复杂。在本文中,我们讨论了可以使用VDM++来建模当下流行国际象棋规则的另类范式,并展示了我们认为最佳的模型。同时说明了这个模型怎样和标准的文本表示棋局的符号连接起来。这可以用来把正式模型和更方便的接口结合起来。