Coder Social home page Coder Social logo

software-testing---pt_ma2_1's People

Contributors

nvanommeren avatar pacbeckh avatar stil4m avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

pacbeckh stil4m

software-testing---pt_ma2_1's Issues

Lab 1 assessment

Nice says, very haskell-ish (all solutions were quite nice, but for the final one kudos to @pacbeckh). The only suggestion I can make about your CSI solution is to use backticks: instead of (\y -> says y x), you can write (says x).

In Euler.hs, you seem to like dollars so much you use them sometimes on one argument: it would work, but not needed.

Besides that, I don’t have anything else to say: the code is good and you obviously know what you’re doing. Did the FP school help or were you natural born haskellers? Combined with the fact that there is a well-done bonus, this week is a ++. Congrats!

Close the issue if/when you don't have any questions.

Lab 4 assessment

  • Exercise 4.55) I do not understand what is wrong with the implementation of insertSet. It should already block duplicates.

“has to be changed” means that it cannot simply wrap :. The given implementation is, of course, correct.

  • Is there an easy way to remember the rules applying to the Cartesian product of Theorem 4.38? / How can I visualize it, see the logic behind it?

There is a figure right above this theorem, and it is there for a reason. Here’s how the first item of the theorem could be visualised:

Plot

The question beeing, did I understand this correctly?

Yes. Since heterogeneous lists are not allowed in Haskell, the first element of [[],[[]]] has a type of a list of lists, since it has to be type-compatible with the second element of the same list. An independently specified [] has a type of “list of somethings”.

And it’s not “beeing”, it’s “being”.

  • The notation used in section 5.6 is confusing to me. Because I am used to read |a| as 'the size of a'. Am I correct when I say the collection of equivalence classes R: A/R = {|a| | a in A} has the type set of sets? Implying that |a| stands for the set of elements that are equivalent to a in this case.

Yes, that’s why personally I prefer the asymmetric notation of A|ᵣ. Yet, the bar-brackets are commonly used symbols in mathematics and can also stand for modulus for integers and for cardinality of sets.

  • In Lemma 5.81, if a set A would be empty then the proof for part 1 ( every equivalence-class is non-empty, because there is an element a in A, for which a is in the set A [reflexive] ) does not hold because there is no element a in A. Or do I have to see this differently?

You are correct. The definition of the lemma should have stated that it only applies to non-empty sets.

Nice symClos. 2 hours for a one-liner, hé?

Ex.9 is very nice as well, so a well deserved ➕➕ for week 4.

Lab 2 assessment

Very nice code, very Haskell-ish. An idea about your triangle: why not use delete twice for the last one, then the remaining one will be the middle element? One can also use sort, which technically also sorts the array into max, min and middle elements.

Another remark is also very tiny: try not to use [Char] and String both within the same program — it makes it look like some functions are type-incompatible with others.

All in all, a solid ➕➕ for week 2. Played a lot with your code trying to break it. It didn't.

Labs 5-6 assessment

Week 5: nicely, professionally done, well documented.

Week 6: impressive.

Week 6: would Data.Bits work even faster than Data.Char? I think it would…

Weeks 5 and 6 are ➕➕ each.

Lab 3 assessment

Parsers are usually tested by round-tripping: given a correctly formed term, unparsing it and parsing the result should yield the same term. (A round trip may start with a grammatically formed string, but it is harder since determining whether two strings are equivalent with respect to a given grammar, is not trivial — see some explanation here in §3). Your tests are necessary but impractically far from sufficient. An easy way to see it is to notice your conditions are formulated in a regular way (“foo should be followed by bar”), and an expression language is context-free and therefore can only be approximated by regular means. Theoretically if I remember correctly it is proven that a combination of a Dyk language and regular expressions is as expressive as CFG — practically it means you should have checked for balanced brackets ;)

It is just as traditional to leverage basic algebraic laws by any normalisation — in your case it would mean at least removing duplicate clauses in all conjunctions and disjunctions. You could do this while flattening if it's bottom up, or after flattening (as in Jan’s reference solution). Same things in a more severe incarnation are needed in the bonus assignment due to the nature of SAT solving. For details I refer again to the reference implementation.

Why n div 2 in the random formula generator? n - 1 is too mainstream?

With some rough edges, it is still well ➕➕ worth of effort.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.