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++建模国际象棋规则的不同范式,并展示了我们认为的最佳模型。此外,还说明了如何将该模型与标准文本表示法连接起来以记录棋局中的走法。这可用于将形式化模型与更便捷的界面相结合。