Due to popular demand, tests for project 4

125 views
Skip to first unread message

Leif Andersen

unread,
Apr 10, 2013, 3:35:54 PM4/10/13
to utah-compilers-spring-2013
It really isn't anything different from last project, just with a few additional tests that Matt had, and a Makefile, here you go:

https://github.com/LeifAndersen/compilers_project_tests4

If someone wants to make it better, please do so.

~Leif Andersen

The λ Calculus:
True: (λ (☺ ☹) ☺)
False: (λ (☺ ☹) ☹)
If: (λ (? ☺ ☹) (? ☺ ☹))

Kevin Avery

unread,
Apr 10, 2013, 10:03:02 PM4/10/13
to utah-compiler...@googlegroups.com
I've updated my interpreters (glorified hacks on the *-header files):

Leif Andersen

unread,
Apr 11, 2013, 1:13:29 AM4/11/13
to Kevin Avery, utah-compilers-spring-2013
If anyone wants to merge the two repos that would be great, otherwise I will 'tomorrow' (from twitter.com/mattmight: "In academic parlance, "tomorrow" means "never."").


~Leif Andersen

The λ Calculus:
True: (λ (☺ ☹) ☺)
False: (λ (☺ ☹) ☹)
If: (λ ( ☺ ☹) ( ☺ ☹))


--
You received this message because you are subscribed to the Google Groups "Utah Compilers, Spring 2013" group.
To unsubscribe from this group and stop receiving emails from it, send an email to utah-compilers-spri...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Kevin Avery

unread,
Apr 11, 2013, 6:27:02 PM4/11/13
to utah-compiler...@googlegroups.com, Kevin Avery
Looks good.

I'm going to remove them from our repo, and if we write any more tests I'll just push to yours.
To unsubscribe from this group and stop receiving emails from it, send an email to utah-compilers-spring-2013+unsub...@googlegroups.com.

cam

unread,
Apr 12, 2013, 5:36:04 PM4/12/13
to utah-compiler...@googlegroups.com
Leif,

Thanks for the tests!  I added a few more to your repo.  

Some of the try tests I added break the reference desugarer/cps (for loop around try statement around break and continue), but you can compare your printed output to python3.

This test (dynamicDictKeys.py) makes sure you transform keys in dicts as well as values.  This caught me by surprise...

Thomas Gilray

unread,
Apr 13, 2013, 7:53:12 PM4/13/13
to utah-compiler...@googlegroups.com
I turned in my code still unsure on a few of your tests, a number of your tests fail identically for both my version and your answer key:

Requires g$list defined in cps-header?
Testing: tests/indexed3.py
tests/indexed3.py.expected.rkt:214:2: expand: unbound identifier in module in: g$list

Seems to need Exception:
Testing: tests/multi_try.py
tests/multi_try.py.expected.rkt:256:64: expand: unbound identifier in module in: g$Exception

get-field, is specifically excluded in the spec, are these tests for your own extensions?
Testing: tests/dot1.py
tests/dot1.py.expected.rkt:215:1: get-field: bad syntax

Or on assign5.1.py.expected.lir (or hir) which says b is not defined. Python also does not accept this program, saying b is undefined.
   b = range(0,100)
   b[42],d = 7,8
works, but just
   b[42],d = 7,8
fails.

Excuse me if this has previously been discussed, but I was still unsure if these programs were anything to worry about since they fail on the answer keys as well, all for seemingly reasonable reasons.

--
Tom
Reply all
Reply to author
Forward
0 new messages