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

Week 4: Ex 7 #15

Open
BertLisser opened this issue Oct 6, 2017 · 1 comment
Open

Week 4: Ex 7 #15

BertLisser opened this issue Oct 6, 2017 · 1 comment

Comments

@BertLisser
Copy link

qcTestContainsRelTc = verboseCheck (\c -> containsRel c (trClos c))

and

cTestIsTransitive = verboseCheck (\c -> isTransitive (trClos c))

must become

verboseCheck (\x->  containsRel x (trClos x) && isTransitive (trClos x))

Both properties must be simultaneously valid.

Good (=8)

@ikmarlin
Copy link
Contributor

ikmarlin commented Oct 6, 2017

Hi Bert,

qcTestContainsRelTc checks that the original relation is part of the closure

qcTestIsTransitive checks that the relation is transitive

qcTestIsTrClos however, checks for the 3 properties (contains original relation, is transitive and is minimal). I'm not sure if it's correct according to your suggestion, but the 2 checks you're referring to are indeed not the test to check if the relation is a transitive closure.

qcTestIsTrClos :: IO ()
qcTestIsTrClos = verboseCheck (\c -> let cl = trClos c in isTransitive cl ==> containsRel c cl ==> isMinimumTC cl c)

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

2 participants