我使用graphviz
根据很多人给我的建议,但我遇到了一个问题。我想使用Format.module
在ocaml
中写一个点,并且我有一个记录,其中有五个字段定义了一个自动机,其中包括由列表int*char*int
表示的转换以及由int
列表表示的最终状态。第一个字段是一个int
的初始状态。我还定义了一个函数成员,它接受一个参数并测试它是否是给定列表的成员。我该怎么做,以便我可以编写一个完整的点来识别初始状态,并用节点[shape = point]start ; start -> x
来表示它,并用圆圈表示最终状态,用双环来表示它们。我想这样做,但我遇到了问题,当我编译它,它说如何绘制一个自动机图?
File "automatagraphicstest1.ml", line 44, characters 22-37: Error: This expression has type automate -> Format.formatter -> int * char * int -> unit but an expression was expected of type Format.formatter -> 'a -> unit Type automate is not compatible with type Format.formatter
请为您的代码使用pastebin。编辑器的屏幕截图不可用。 – Drup
http://pastebin.com/QK5qxEhd –
http://pastebin.com/5NSb7qFU这是另一个尝试我想要什么,如果你看看它,你可能明白我想在这里做什么 –