From: Julian R. <jro...@gm...> - 2021-08-18 09:47:21
|
I was able to find a better solution than my initial one, in the revised source files attached: src\code\typechecker\typechecker-z\src\main\java\net\sourceforge\czt\typecheck\z\Checker.java src\code\typechecker\typechecker-z\src\main\java\net\sourceforge\czt\typecheck\z\util\DependencyGraph.java. This better solution detects when a cyclic dependency is added and resolves it, which results in a pass. Whereas the initial solution detects a cyclic dependency after the event and throws an exception, resulting in output errors. Please see outputs from both czt.jar and (ZWordTools) cztinterface.jar with the better solution applied. (Since I only have a very small number of test cases, the initial solution is left intact to catch livelock resulting from other inputs. So you will still need the modified TypeChecker.java, ErrorMessage.java and ErrorMessage_en.properties files attached to my previous post. But, the UNEXPECTED_CYCLIC_DEPENDENCY_IN_LIST exception can be deleted if this better solution proves acceptable.) With thanks, julian |