<Grid x:Name="grid" Margin="0,0,490,170"> ...
答案 0 :(得分:3)
SWI-Prolog 7.x将double_quotes
标志的默认值从codes
更改为string
。这显然是导致您描述的问题的原因。如果使用您发布的代码在源文件的顶部添加以下指令:
:- set_prolog_flag(double_quotes, codes).
你应该得到:
?- solve([("ab","abab"), ("b","a"), ("aba","b"), ("aa","a")], Solution).
Solution = [4, 4, 2, 1] ;
Solution = [1, 1, 3, 2, 2, 4, 4] ;
Solution = [4, 4, 2, 1, 4, 4, 2, 1] ;
Solution = [1, 1, 3, 2, 2, 4, 3, 4, 2|...] ;
Solution = [1, 1, 3, 2, 2, 4, 4, 4, 4|...] ;