From leavens@larch.cs.iastate.edu Mon Nov 15 13:00:55 2004 Date: Mon, 15 Nov 2004 13:00:55 -0600 (CST) From: Gary T. Leavens To: Raul Piaggio Subject: Re: Old exams Hi Raul, Go to http://www.cs.iastate.edu/~leavens/ComS541.html and follow the links to each year. On Mon, 15 Nov 2004, Raul Piaggio wrote: > I couldn't find the suggested practice old exams for Spring 90, Spring 91, > Spring 92, Spring 94, Spring 95 or Spring 97 in the website. If there are no > electronic versions, can I drop by your office to make copies? Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ------------------------ From leavens@larch.cs.iastate.edu Sun Nov 21 19:07:29 2004 Date: Sun, 21 Nov 2004 19:07:29 -0600 (CST) From: Gary T. Leavens To: Neeraj Khanolkar Subject: Re: problem 8 hw 5 Hi Neeraj, On Sun, 21 Nov 2004, Neeraj Khanolkar wrote: > Sorry to bug you on a weekend. No problem. > In problem 8 we are supposed to print out only the redexes and the > consequent reduction. Yes. > For this I think it is necessary to identify the bottom-most call to > reduce1Step in the recursive call chain. The way I am thinking of doing > this is by simply printing on the first return and ignoring all other > returns by using an aspect flag. That is one way to do it, but not the only way. > But this does not seem very elegant. Is it possible to specify this in the > pointcut itself, such that it can capture the last call? For example using > C-flow or cflow-below. I am not sure how to capture that in terms of cflow/cflowbelow, as there is no way to know at the time of entering a join point (in general) whether it will or will not call some other method (it's not computable in general). But you are perhaps stuck on advising calls to reduce1Step. Perhaps you should advise some other method... Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ------------------------------- From leavens@larch.cs.iastate.edu Sun Nov 21 21:46:18 2004 Date: Sun, 21 Nov 2004 21:46:18 -0600 (CST) From: Gary T. Leavens To: Neeraj Khanolkar Subject: Re: Q 10 Hi Neeraj, On Sun, 21 Nov 2004, Neeraj Khanolkar wrote: > In problem 10, do we have to use the same method for all 3 subtypes or > simply add the method to the interface and add different versions of it to > each subclass seperately? Sorry if this question violates any semantics of > aspectJ, I've just skimmed thru the book. The problem says to add "a method evaluate() into the interface Term and its three subtypes", so you have to add it to the interface, but I expect that the method added to the interface will be abstract, not a concrete method. Add overrides to the subtypes. > I am guessing that using the same method for all 3 via addition to > interface would mean that the method have some explicit target type > checking for conditionals. Is that Ok? I'll probably take off points if you do it that way. :-) It's best to rely on the dispatch of Java/AspectJ to find the right code. Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ------------------------ From leavens@larch.cs.iastate.edu Mon Nov 22 01:47:11 2004 Date: Mon, 22 Nov 2004 01:47:11 -0600 (CST) From: Gary T. Leavens To: Daniel Patanroi Subject: Re: hw5 no15 Hi Daniel, On Mon, 22 Nov 2004, Daniel Patanroi wrote: > Dr. Leavens, > > For no 15, since the variable is untyped, how do you want the type check works? It could either do type inference, or you can change the language to give type declarations (match the simply-typed langauage). > Is it okay to assume that a variable will have a type of o ? I would prefer either to do true inference or to add type declarations for the declarations of variables in lambda abstractions. Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ------------------------ From leavens@larch.cs.iastate.edu Sun Dec 12 10:26:03 2004 Date: Sun, 12 Dec 2004 10:26:03 -0600 (CST) From: Gary T. Leavens To: Neeraj Khanolkar Subject: Re: chapter 4 and 5 Hi Neeraj, On Sat, 11 Dec 2004, Neeraj Khanolkar wrote: > Sorry for being so 'exam oriented' but right now would rather spend time > on semantics than on stuff that's not relevant for the exam. > > I was going through the exam study guide and sections 4.3 onwards in > chapter 4 and section 8.1 to 8.4 dont seem terribly important. > Would it be safe to just skip them? You're talking about Laddad's book, right? It's hard to say, as I'm still making up the exam. :-) I think the semantics are more important than the uses of AspectJ, but I may also ask some questions in which it would be usefult to know something about applications of the language (but not in detail). I recommend skimming the other sections to get some idea of the problems that can be solved, and the main techniques for solving them. Certainly the details of solutions aren't going to be important. > They are quite interesting, but right now I would like to spend the > remaining time on semantics. Ok. Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 --------------------------