나는 많은 사람들이 나에게 준 권장 사항에 따라 graphviz
을 사용했지만 문제가 발생했습니다. 에 ocaml
이라는 점을 쓰고 싶습니다. int*char*int
의 목록과 int
목록으로 표시되는 최종 상태로 표시되는 전환을 포함하는 자동 완성을 정의하는 다섯 개의 필드가있는 레코드가 있습니다. 첫 번째 필드는 초기 상태이며 하나는 int
입니다. 필자는 매개 변수를 취하여 지정된 목록의 멤버인지 테스트하는 함수 멤버도 정의했습니다. 어떻게하면 초기 상태를 인식하고 노드 [shape = point]start ; start -> x
및 원과 다른 전환 및 이중 원으로 최종 상태를 나타내는 전체 점을 작성할 수 있습니까?오토 마톤 다이어그램 그리는 방법?
let fmt_transitions fmt auto =
Format.fprintf fmt "@[<v 2>digraph output {@,%[email protected],@]}@,@."
(Format.pp_print_list (fmt_transition1 auto)) auto.transitions
문제가 pp_print_list
예상하는 것입니다 : 내가 그 일을 시도했지만 나는 그것을를 컴파일 할 때 내가 문제로 실행, 그것은
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
코드에 페이스트 빈을 사용하십시오. 에디터의 스크린 샷을 사용할 수 없습니다. – Drup
http://pastebin.com/QK5qxEhd –
http://pastebin.com/5NSb7qFU 이것은 내가 바라는 부분에 대한 또 다른 시도입니다. 여기를보고 싶은 것을 이해할 수 있습니다. –