Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

代码上的一处错误 #5

Open
JiajunDu opened this issue Oct 28, 2023 · 0 comments
Open

代码上的一处错误 #5

JiajunDu opened this issue Oct 28, 2023 · 0 comments

Comments

@JiajunDu
Copy link

C08/LogicCalculator.hs代码中,第57行的函数体有一处错误,可以尝试以下的测试样例:

ex5 :: Formula (Int, ())
ex5 = Exist [1, 2, 3] $ \n -> Body (n :=: Con 3)
solutions ex5

代码应修改为:

solutions (Exist (x:xs) as) = [(x,fs) | fs <- solutions (as (Con x)),
                                            satisfiable (as (Con x))] 
                              ++ solutions (Exist xs as)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant