First assignment now available

Benutzeravatar
sewe
Sonntagsinformatiker
Sonntagsinformatiker
Beiträge: 295
Registriert: 16. Jan 2009 14:53
Kontaktdaten:

First assignment now available

Beitrag von sewe »

The first assignment (6 tasks, 10 points overall) is now available in the SVN: https://cage.st.informatik.tu-darmstadt ... gnment.rkt.

This assignment is due on Thursday, 19 April 2012, 23:59. Please commit your solution till then into your group's SVN directory under a subdirectory named 2012-04-13: https://cage.st.informatik.tu-darmstadt ... gnment.rkt.

Please note that GroupReg registration is still open until Wednesday, 12:00, so your group's directory will only be created at that time. But you can already do your homework and solve the assignment beforehand, of course, and only commit it later on Wednesday or Thursday.

DanielSchoepe
Mausschubser
Mausschubser
Beiträge: 49
Registriert: 28. Sep 2009 11:39

Re: First assignment now available

Beitrag von DanielSchoepe »

Is it intentional that list-position crashes if the list argument to the recursive call is empty, i.e. if what it's supposed to do fails (I hope this isn't a spoiler)? The reason for this is that first is called with l as argument without checking whether l actually is a cons-cell. I suspect this is unintentional, as it renders the function pretty much useless, although it's easy to fix.

FeG
Endlosschleifenbastler
Endlosschleifenbastler
Beiträge: 182
Registriert: 6. Dez 2007 07:01

Re: First assignment now available

Beitrag von FeG »

I think this crash can only occur if the expression analyzed contains undefined references, which we –- so do I assume –- don't consider here.

DanielSchoepe
Mausschubser
Mausschubser
Beiträge: 49
Registriert: 28. Sep 2009 11:39

Re: First assignment now available

Beitrag von DanielSchoepe »

FeG hat geschrieben:I think this crash can only occur if the expression analyzed contains undefined references, which we –- so do I assume –- don't consider here.
Weren't we supposed to handle undefined reference errors explicitly rather than just to let it fail somewhere (as an exeception to the general rule that we don't have to worry about error handling) or have I misunderstood that?

FeG
Endlosschleifenbastler
Endlosschleifenbastler
Beiträge: 182
Registriert: 6. Dez 2007 07:01

Re: First assignment now available

Beitrag von FeG »

I didn't read this anywhere, but I might have missed something...

Benutzeravatar
sewe
Sonntagsinformatiker
Sonntagsinformatiker
Beiträge: 295
Registriert: 16. Jan 2009 14:53
Kontaktdaten:

Re: First assignment now available

Beitrag von sewe »

DanielSchoepe hat geschrieben:Weren't we supposed to handle undefined reference errors explicitly rather than just to let it fail somewhere (as an exeception to the general rule that we don't have to worry about error handling) or have I misunderstood that?
FeG hat geschrieben:I didn't read this anywhere, but I might have missed something...
This was mentioned in the exercise, yes.

That being said, I wasn't expecting you to add error handling to wae-to-waedb, for which we provided the list-position function as a hint, but only to calc-db.

However, in hindsight it does make sense to have "undefined identifier" error handling in wae-to-waedb as well, so please extend list-position if you feel this is necessary.

FeG
Endlosschleifenbastler
Endlosschleifenbastler
Beiträge: 182
Registriert: 6. Dez 2007 07:01

Re: First assignment now available

Beitrag von FeG »

sewe hat geschrieben:This was mentioned in the exercise, yes.
Where exactly? Or do you mean in the exercise session on last Friday? If so, It would be nice to add such things either to the exercise file or as a comment in the forum, as I, e.g., have another lecture on Friday in parallel, so I'll not always be able to attend the exercise class. Thanks in advance.

So if I understood you correctly, we have to do error-handling in and only in calc-db, right?

Benutzeravatar
sewe
Sonntagsinformatiker
Sonntagsinformatiker
Beiträge: 295
Registriert: 16. Jan 2009 14:53
Kontaktdaten:

Re: First assignment now available

Beitrag von sewe »

FeG hat geschrieben:So if I understood you correctly, we have to do error-handling in and only in calc-db, right?
Right. The idea is that the preprocessor (or any preprocessor you will write in this course) can be dumb. Only the interpreter should be able to detect problems like an "unbound identifier" (or its equivalent in de Brujin form) and throw an user-defined error.

Aside from that, you don't have to implement error handling, e.g., in the parser. The following will parse just fine, for example:

Code: Alles auswählen

{+ 1 2 3}
Our parser will simply ignore the 3 part and yours can do that, too.

Hope this clarifies things.

Benutzeravatar
sewe
Sonntagsinformatiker
Sonntagsinformatiker
Beiträge: 295
Registriert: 16. Jan 2009 14:53
Kontaktdaten:

Re: First assignment now available

Beitrag von sewe »

The solution for the first assignment is now available in the SVN: https://cage.st.informatik.tu-darmstadt ... lution.rkt. (Nevertheless, I hope to see you in the exercise class today.)

Osterlaus
BSc Spammer
BSc Spammer
Beiträge: 1263
Registriert: 23. Aug 2007 12:46
Wohnort: DA

Re: First assignment now available

Beitrag von Osterlaus »

sewe hat geschrieben:The solution for the first assignment is now available in the SVN: https://cage.st.informatik.tu-darmstadt ... lution.rkt. (Nevertheless, I hope to see you in the exercise class today.)
Yeah, that's cool! Will you always publish an example solution about an hour before we have to hand in our final version? :twisted:

Benutzeravatar
sewe
Sonntagsinformatiker
Sonntagsinformatiker
Beiträge: 295
Registriert: 16. Jan 2009 14:53
Kontaktdaten:

Re: First assignment now available

Beitrag von sewe »

:oops: Didn't think about that I postponed the deadline. That being said, I am pretty confident that you can do assignment 1 on your own.
Osterlaus hat geschrieben:Yeah, that's cool! Will you always publish an example solution about an hour before we have to hand in our final version?
Anyway, I'll always try to have the solution out before the exercise class.

Antworten

Zurück zu „Archiv“