摘要
Alloy是一种轻量级的建模语言,其所建模型可以由Alloy分析器自动地进行检验,并提供可视化的工具。过河问题是一个经典的逻辑问题,它要求一队人在一定约束下过河到对岸。给出基于Alloy的对复杂过河问题求解的代码和可视化的结果,通过对过河问题的基于Alloy的求解分析,提出了用Alloy语言对复杂问题建模、求解的思路。
Alloy is a light weight modelling language.The model set up by it can be checked automatically by Alloy Analyzer and can provide visualization tools.River crossing problem is a classical logic puzzle.In the puzzle,entire team members should cross the river to another bank abiding by some restrictions.In this paper,for the first time,we presented the code of Alloy-based solution for complex river crossing problems and the visualised outcomes.In addition,by the analysis on Alloy-based solutions for river crossing,we presented the thought of modelling and solving complicated problems with Alloy.
出处
《计算机应用与软件》
CSCD
2010年第10期165-167,184,共4页
Computer Applications and Software