You can subscribe to this list here.
2011 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
(2) |
Oct
|
Nov
(1) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2012 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(2) |
Jun
(10) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(5) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
From: Rajan, H. [C. S] <hr...@ia...> - 2014-11-16 23:58:48
|
Hi Jim, Good to hear from you. Thanks for your e-mail.? Main thing to do to make Ptolemy work with Java 8 is to update the compiler, the runtime will work automatically. This would involve taking a diff between Java 7 and Java 8 compiler javac compiler and applying that diff to the Ptolemy compiler. Unfortunately for this semester and early next semester it looks like all of the people who have worked on the Ptolemy compiler are tied with other projects. So most realistic option that I can suggest to you is to change your environment to Java 7. p.s.: I have been wondering whether with support for latest features in Java 8, the Ptolemy language features can be implemented as a library as opposed to a language. If that can be done, keeping up with latest Java version would be much easier. - Hridesh ________________________________ From: James Heliotis <je...@cs...> Sent: Sunday, November 16, 2014 3:07 PM To: pto...@li... Subject: [Ptolemy] Ptolemy Under Java 8 Dear Ptolemy Users: I cover Ptolemy in my AO seminar here every year. However, the precompiled libraries do not seem to jive with Java 8, to which I upgraded at the start of the semester. I downloaded the source, but felt overwhelmed by the amount of stuff in there. Could anyone advise me on making an updated copy of the compiler and runtime? My current workaround is to change my environment to Java 7, whose installation is still on my computer. Thanks, Jim -- James Heliotis Computer Science Department Rochester Institute of Technology Room 70-3515 +1.585.475.6133 http://www.cs.rit.edu/~jeh This email is confidential and intended for the named recipient(s). In the event the email is received by someone other than the recipient, please notify the sender at je...@cs.... |
From: James H. <je...@cs...> - 2014-11-16 21:34:03
|
Dear Ptolemy Users: I cover Ptolemy in my AO seminar here every year. However, the precompiled libraries do not seem to jive with Java 8, to which I upgraded at the start of the semester. I downloaded the source, but felt overwhelmed by the amount of stuff in there. Could anyone advise me on making an updated copy of the compiler and runtime? My current workaround is to change my environment to Java 7, whose installation is still on my computer. Thanks, Jim -- James Heliotis Computer Science Department Rochester Institute of Technology Room 70-3515 +1.585.475.6133 http://www.cs.rit.edu/~jeh This email is confidential and intended for the named recipient(s). In the event the email is received by someone other than the recipient, please notify the sender at je...@cs.... |
From: Rajan, H. [C. S] <hr...@ia...> - 2013-11-07 17:01:36
|
Hi James, Thanks for your interest in Ptolemy. The semantics of Ptolemy is discussed in more detail in our ECOOP 2008 paper http://design.cs.iastate.edu/papers/ECOOP-2008/ The technical report version contains more details. http://design.cs.iastate.edu/papers/TR-07-14/ The semantics of translucid contracts is discussed in more detail in our AOSD 2011 paper http://design.cs.iastate.edu/papers/AOSD-11/ Mehdi Bagherzadeh in my research group continues to work on the Ptolemy project. He and I could also answer any remaining questions that you may have. - Hridesh On Nov 7, 2013, at 9:20 AM, James Heliotis <je...@cs...> wrote: > Hello, everyone, > > As a fan of design-by-contract I've been reading with great interest about the translucid contracts added a while back in Ptolemy. I found that the information available at Iowa State's web site was not satisfying that interest completely! > > Is there a more complete description of the semantics of the Ptolemy language somewhere, perhaps inside one of the papers listed at the aforementioned web site? That would also help me with some other questions I have about the meaning of return types in events. Or at this point is the best approach to simply ask questions here as they come up? > > Thanks, > Jim > > > -- > James Heliotis > Computer Science Department, Rochester Institute of Technology > Room 70-3515 > +1.585.475.6133 > http://www.cs.rit.edu/~jeh > > This email is confidential and intended for the named recipient(s). In the event the email is received by someone other than the recipient, please notify the sender at je...@cs.... > > > > > > > ------------------------------------------------------------------------------ > November Webinars for C, C++, Fortran Developers > Accelerate application performance with scalable programming models. Explore > techniques for threading, error checking, porting, and tuning. Get the most > from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk > _______________________________________________ > ptolemyj-users mailing list > pto...@li... > https://lists.sourceforge.net/lists/listinfo/ptolemyj-users |
From: James H. <je...@cs...> - 2013-11-07 15:46:57
|
Hello, everyone, As a fan of design-by-contract I've been reading with great interest about the translucid contracts added a while back in Ptolemy. I found that the information available at Iowa State's web site was not satisfying that interest completely! Is there a more complete description of the semantics of the Ptolemy language somewhere, perhaps inside one of the papers listed at the aforementioned web site? That would also help me with some other questions I have about the meaning of return types in events. Or at this point is the best approach to simply ask questions here as they come up? Thanks, Jim -- James Heliotis Computer Science Department, Rochester Institute of Technology Room 70-3515 +1.585.475.6133 http://www.cs.rit.edu/~jeh This email is confidential and intended for the named recipient(s). In the event the email is received by someone other than the recipient, please notify the sender at je...@cs.... |
From: Cristian V. S. <cvi...@gm...> - 2013-06-01 05:20:44
|
Problem solved... It is necessary to instantiate the handlers which catch the events... Definitely, it is necessary to learn more and write a more detailed manual about Ptolemy, Greetings :) On Fri, May 31, 2013 at 9:16 PM, Cristian Vidal Silva <cvi...@gm...>wrote: > Hi. > > In the 00-FigureEditor example I added a new class triangle, and the event > FEChanged functions... To learn more I added a new event FEAmplify which is > handled by update2(FEAmplify next){...}. I indicated that handler for the > event FEAmplify. The code is so similar, and I announced FEAmplify in the > event draw of the triangle 'announce FEAmplify(this){....};' but incredibly > this event is not captured.... The compiler doesn't show errors... > > What happen with my code? I hope to learn to use Ptolemy ASAP. I attach > the code. > > Greetings and I wait for your comments. > |
From: Hridesh R. <hr...@ia...> - 2013-05-31 19:04:47
|
Hi Cristian, Event announcements are not automatically inherited, rather if the code containing the announce statement is run than the event is announced. In your example, you make super calls in the class PurchaseBronze on line 7. Since that super call runs the constructor on line 15-29 in class Purchase and that constructor announces PEDiscount event your constructors in PurchaseBronze would also announce PEDiscount event. Best wishes, Hridesh Hridesh Rajan Associate Professor of Computer Sc. & Software Eng. Director, Laboratory for Software Design Iowa State University | 226 Atanasoff Hall | Ames, IA Voice: +1-515-294-6168 | Fax: +1-515-294-0258 URL: http://www.cs.iastate.edu/~hridesh Lab's URL: http://design.cs.iastate.edu/ On Fri, May 31, 2013 at 1:05 PM, Cristian Vidal Silva <cvi...@gm...> wrote: > Hi Dr. Rajan. > > > In my example, I have class Costumer; class HotelService and subclasses > Gold, Silver and Bronze; class Purchase and subclasses PurchaseGold, > PurchaseSilver and PurchaseBronze as well. Purchase relates Costumer and > HotelService... In this scenario, each time when a Purchase occurs, I want > to apply a discount. This is, in the constructor of Purchase a discount is > applied... > > Originally, the attribute PaidValue was double... Considering your advices, > I defined a class PaidValue, and now I defined an attribute PaidValue value > in the class Purchase. The handler applies the discount in theory (I have > instantiated subclass objects only for which the event is not applied)... > Defining a new class was necessary, but that is OK... > > Thus, the event is declared in the super class Purchase only and subclasses > PurchaseGold, PurchaseSilver, PurchaseBronze only gives an specific hotel > instance to its super class constrctor. Thus, those subclasses should > inherit the events announced in their super class, shouldn't they? > > I attach my code and wait for your comments. > > Sincerely, > > Cristian. > > > > > > > On Fri, May 31, 2013 at 9:54 AM, Hridesh Rajan <hr...@ia...> wrote: >> >> > - Are inheritable the events declared in a super class method? I have a >> > class Purchase and subclasses PurchaseGold, PurchaseSilver and >> > PurchaseNormal. How can those classes inherit from their super class its >> > announced events? >> >> Could you send me some more details? It would be helpful to see the >> example code to understand what you are doing. >> >> > - Can I modify the attributes of an Event? If so, how? For the class >> > Purchase I need an event PEDiscount that modify one of its parameters... >> > This event is announced in the constructor of class Purchase, thus the >> > object doesn't exist yet to be a parameter (I can use 'this' and declare >> > an >> > object Purchase as a local variable in the event). >> >> You cannot change the parameters themselves, although you can change >> the variables reachable via these parameters. To give you an example >> consider >> >> class Line { >> Point p1, p2; >> } >> void event E { Line l; } >> void handler(E e) { >> e.l().p1 = new Point(); >> e.invoke(); >> } >> >> Here you cannot change l, but you can change object p1 reachable using l. >> >> > I'm now reading your manual "Ptolemy: A Language with Quantified, Typed >> > Events" to be more familiar with Ptolemy. >> >> Following programming language manual is more recently updated. >> http://ptolemy.cs.iastate.edu/docs/ > > |
From: Hridesh R. <hr...@ia...> - 2013-05-31 15:43:24
|
Hi Cristian, I am glad that you were able to define your own project structure. Sorry about the trouble. You are right that we don't currently describe how to create a new Ptolemy project in the programming language manual. If you would be willing to describe this process from your point of view, we would gladly add that description to the programming language manual. Best wishes, Hridesh >> Hi Dr. Rajan. >> >> Thanks very much.... I run the examples using ant... Nevertheless, it >> seems not simple to write a Ptolemy project. Do I have to respect the >> structure of the examples for a new project? Where can I find a manual to >> know more about those details? >> >> I wait for your comments. >> >> Sincerely, >> >> Cristian. >> > Dear Dr. Rajan. > > I discovered that really Ptolemy is not so difficult and I can define my own > structure as well... > > Thanks for your assistance. > > > Sincerely, > > Cristian. |
From: Rajan, H. [C. S] <hr...@ia...> - 2013-05-31 15:34:20
|
Hi Cristian, If the event is declared like public void event PEDiscount{ Date day; double Value; } then you can access the context variables in the method like this public void handler(PEDiscount next) { System.out.println("Value " + next.Value()); next.invoke(); } Note "next.Value()". - Hridesh ________________________________ From: Cristian Vidal Silva [cvi...@gm...] Sent: Friday, May 31, 2013 8:22 AM To: pto...@li... Subject: [Ptolemy] Catching a Constructor Execution... Hi. I want to capture a constructor method of a class Purchase(Date day, double Value) to apply a discount... 1st, I created an event: public void event PEDiscount{ Date day; double Value; } 2nd, I announce this event in the constructor: public Purchase(Date day, double Value){ ... announce PEDiscount(day, Value);} 3rd, I defined a class Checker to register and handle in which the handler only shows the PaidValue: public class Checker{ public Checker(){ register(this);} public void handler(PEDiscount next) { System.out.println("Value " + next.Value()); next.invoke(); } when PEDiscount do handler; } As a reult, when I compile my project, a message "error: cannot find symbol"... When I comment the line to access to attribute PaidValue, the compiler does not show an error... How can I access the attributes of an event? Greetings from MSU. |
From: Cristian V. S. <cvi...@gm...> - 2013-05-31 13:23:05
|
Hi. I want to capture a constructor method of a class Purchase(Date day, double Value) to apply a discount... 1st, I created an event: public void event PEDiscount{ Date day; double Value; } 2nd, I announce this event in the constructor: public Purchase(Date day, double Value){ ... announce PEDiscount(day, Value);} 3rd, I defined a class Checker to register and handle in which the handler only shows the PaidValue: public class Checker{ public Checker(){ register(this);} public void handler(PEDiscount next) { System.out.println("Value " + next.PaidValue); next.invoke(); } when PEDiscount do handler; } As a reult, when I compile my project, a message "error: cannot find symbol"... When I comment the line to access to attribute PaidValue, the compiler does not show an error... How can I access the attributes of an event? Greetings from MSU. |
From: Rajan, H. [C. S] <hr...@ia...> - 2013-05-09 15:53:14
|
From: Cleivson S. de A. <cle...@gm...> - 2013-04-17 02:05:11
|
Hi, I'm trying to develop using Ptolemy for my work at university. One problem I'm having is when I try to announce an event in a static method. Like this: static void someMethod() { String a = "foo"; announce someEvent(){ a = "anything"; } } The error says: "error: non-static variable this cannot be referenced from a static context". Waiting for help. Thanks. -- Cleivson Siqueira de Arruda Graduando em Ciência da Computação |
From: Irineu M. de L. M. <im...@ci...> - 2012-06-25 03:23:07
|
Indeed, that's exactly what I thought after finding out! ;) 2012/6/20 Robert Dyer <rd...@ia...> > On Tue, Jun 19, 2012 at 10:44 PM, Irineu Martins de Lima Moura > <im...@ci...> wrote: > > This was really my bad. I found out why it was not updating... I had > > forgotten to call invoke() inside the event handler body, thus the > closure > > wasn't being executed and the local wasn't being updated. > > I am sorry! > > No worries. :-) > > By the way, this is a great example of why we have contract support > built into the language. If you stuck a contract onto the event that > requires handlers to call invoke, the compiler would have told you it > was missing! ;-) > > - Robert > -- ------------------------------------------------------ Irineu Martins de Lima Moura |
From: Hridesh R. <hr...@ia...> - 2012-06-20 05:17:03
|
Hi Irineu, >> On another topic, does Ptolemy have any AspectJ features such as inter-type >> declarations and/or privileged aspects? > > The (old) JastAdd based compiler has support for ITDs, but not > privileged aspects. I believe at some point we plan to also implement > the same ITD support in the (current) OpenJDK based compiler, but I > don't know what the timeline for that would be. Following up on this, we would very much welcome contributions to implement this and other features in the Ptolemy compiler. It would be of great help. Best wishes, Hridesh Hridesh Rajan Associate Professor of Computer Sc. & Software Eng. Iowa State University | 226 Atanasoff Hall | Ames, IA Voice: +1-515-294-6168 | Fax: +1-515-294-0258 My URL: http://www.cs.iastate.edu/~hridesh My Lab's URL: http://design.cs.iastate.edu/ |
From: Robert D. <rd...@ia...> - 2012-06-20 03:48:36
|
On Tue, Jun 19, 2012 at 10:44 PM, Irineu Martins de Lima Moura <im...@ci...> wrote: > This was really my bad. I found out why it was not updating... I had > forgotten to call invoke() inside the event handler body, thus the closure > wasn't being executed and the local wasn't being updated. > I am sorry! No worries. :-) By the way, this is a great example of why we have contract support built into the language. If you stuck a contract onto the event that requires handlers to call invoke, the compiler would have told you it was missing! ;-) - Robert |
From: Irineu M. de L. M. <im...@ci...> - 2012-06-20 03:44:29
|
Thank you Robert, that was really quick. " This probably indicates a bug. Would you mind filing a simple test case that fails? " This was really my bad. I found out why it was not updating... I had forgotten to call invoke() inside the event handler body, thus the closure wasn't being executed and the local wasn't being updated. I am sorry! 2012/6/19 Robert Dyer <rd...@ia...> > On Mon, Jun 18, 2012 at 11:31 PM, Irineu Martins de Lima Moura > <im...@ci...> wrote: > > When there are registered handlers either the program hangs or the value > of > > local variable 'a' is not updated, depending on the handler. I'm certain > > that the first case is a bug, but what about the second one? Are announce > > blocks allowed to change the value of locals? > > Yes, they are allowed to change locals. The local is allowed in that > block, but not visible (unless passed as context) to any of the > handlers. > > > Note that when I run the > > program with no handler registered at all the value of 'a' does get > changed. > > So I assume that the semantics is that announce blocks can change locals. > > This probably indicates a bug. Would you mind filing a simple test > case that fails? > > > On another topic, does Ptolemy have any AspectJ features such as > inter-type > > declarations and/or privileged aspects? > > The (old) JastAdd based compiler has support for ITDs, but not > privileged aspects. I believe at some point we plan to also implement > the same ITD support in the (current) OpenJDK based compiler, but I > don't know what the timeline for that would be. > > - Robert > -- ------------------------------------------------------ Irineu Martins de Lima Moura |
From: Robert D. <rd...@ia...> - 2012-06-19 04:39:39
|
On Mon, Jun 18, 2012 at 11:31 PM, Irineu Martins de Lima Moura <im...@ci...> wrote: > When there are registered handlers either the program hangs or the value of > local variable 'a' is not updated, depending on the handler. I'm certain > that the first case is a bug, but what about the second one? Are announce > blocks allowed to change the value of locals? Yes, they are allowed to change locals. The local is allowed in that block, but not visible (unless passed as context) to any of the handlers. > Note that when I run the > program with no handler registered at all the value of 'a' does get changed. > So I assume that the semantics is that announce blocks can change locals. This probably indicates a bug. Would you mind filing a simple test case that fails? > On another topic, does Ptolemy have any AspectJ features such as inter-type > declarations and/or privileged aspects? The (old) JastAdd based compiler has support for ITDs, but not privileged aspects. I believe at some point we plan to also implement the same ITD support in the (current) OpenJDK based compiler, but I don't know what the timeline for that would be. - Robert |
From: Irineu M. de L. M. <im...@ci...> - 2012-06-19 04:31:33
|
Hi Robert, Getting back to the semantics inside announce blocks. Right now if I do something like this: int a = 0; announce ResultsUpdatedEvent(a){ a = 2; } return a; When there are registered handlers either the program hangs or the value of local variable 'a' is not updated, depending on the handler. I'm certain that the first case is a bug, but what about the second one? Are announce blocks allowed to change the value of locals? Note that when I run the program with no handler registered at all the value of 'a' *does* get changed. So I assume that the semantics is that announce blocks can change locals. On another topic, does Ptolemy have any AspectJ features such as inter-type declarations and/or privileged aspects? Thank you a lot for your answers about the language :) Regards, Irineu Moura 2012/6/7 Robert Dyer <rd...@ia...> > On Thu, Jun 7, 2012 at 2:08 PM, Irineu Martins de Lima Moura > <im...@ci...> wrote: > > I have another assumption that I would like to confirm if you don't mind. > > It seems that every handler that calls invoke() on the event closure and > > doesn't guard it with a try..catch(Throwable t) is required to list > > Throwable in its exceptions interface. > > I assume that this implementation detail is because invoke() itself lists > > Throwable in its interface since the execution of an arbitrary closure > may > > throw any exception/error. Is that true? > > Yes, this is currently correct. We are currently investigating the > exceptional behavior of handlers and this might change in the future. > -- ------------------------------------------------------ Irineu Martins de Lima Moura |
From: Robert D. <rd...@ia...> - 2012-06-07 19:14:00
|
On Thu, Jun 7, 2012 at 2:08 PM, Irineu Martins de Lima Moura <im...@ci...> wrote: > I have another assumption that I would like to confirm if you don't mind. > It seems that every handler that calls invoke() on the event closure and > doesn't guard it with a try..catch(Throwable t) is required to list > Throwable in its exceptions interface. > I assume that this implementation detail is because invoke() itself lists > Throwable in its interface since the execution of an arbitrary closure may > throw any exception/error. Is that true? Yes, this is currently correct. We are currently investigating the exceptional behavior of handlers and this might change in the future. |
From: Irineu M. de L. M. <im...@ci...> - 2012-06-07 19:09:02
|
Thanks for the answers Robert! I really meant the first form, it's just that I wanted to confirm it. I have another assumption that I would like to confirm if you don't mind. It seems that every handler that calls invoke() on the event closure and doesn't guard it with a *try..catch(Throwable t)* is required to list * Throwable* in its exceptions interface. I assume that this implementation detail is because *invoke()* itself lists *Throwable *in its interface since the execution of an arbitrary closure may throw any exception/error. Is that true? Thanks again for your help so far. 2012/6/7 Robert Dyer <rd...@ia...> > Hi Irineu, > > I apologize for the delayed response. Please see the comments inline > below. > > On Sun, Jun 3, 2012 at 9:54 AM, Irineu Martins de Lima Moura > <im...@ci...> wrote: > > From my observations it seems that any return statement inside an > > announce block refers to return of the event closure so that handlers and > > even the OO code could see the results of the announce block, as shown in > > the documentation¹. However I have found an issue regarding the return > type > > of a method and the return type of an announce block that I'd like some > > clarification. > > Right now the compiler refuses to compile methods with an announce block > > that has a return statement with a different return type than the method > > itself, i.e. if foo returns void and the announced event returns > > Process then the compiler will error out saying that the return type of > the > > return statement inside the announce block doesn't match the return type > of > > the method. If the event being announced has a return type different from > > the method's one but there is no return statement inside the announce > block > > then the code compiles just fine. Is this a bug or the intended behavior, > > i.e. one can not issue return commands inside announce blocks if the > return > > type differs from containing method's one? > > You are correct in assuming that announce expressions currently do not > work. Announce statements are supported but the compiler does not > currently support announce expressions. > > The syntax shown on the example you linked is correct. Your > understanding of the semantics seems also correct. Any compiler issue > you are running into is most likely due to our lack of supporting > announce expressions at the moment. > > You can see this bug report for more details and subscribe for future > updates: > > > http://sourceforge.net/tracker/?func=detail&aid=3439607&group_id=302891&atid=1276944 > > > Also, regarding break and continue statements, it seems that we can't use > > them inside announce blocks that are nested inside while/for loops, is > this > > the intended behavior as well? > > Do you mean that this form isn't allowed: > > while (pred) > announce E (..) { ...; continue; } > > This form should not be allowed. Or did you mean: > > announce E (..) { > while (pred) { ...; continue; } > } > > This form *should* be allowed and if it isn't working, please file a > bug against it. > > - Robert > -- ------------------------------------------------------ Irineu Martins de Lima Moura |
From: Robert D. <rd...@ia...> - 2012-06-07 15:23:31
|
Hi Irineu, I apologize for the delayed response. Please see the comments inline below. On Sun, Jun 3, 2012 at 9:54 AM, Irineu Martins de Lima Moura <im...@ci...> wrote: > From my observations it seems that any return statement inside an > announce block refers to return of the event closure so that handlers and > even the OO code could see the results of the announce block, as shown in > the documentation¹. However I have found an issue regarding the return type > of a method and the return type of an announce block that I'd like some > clarification. > Right now the compiler refuses to compile methods with an announce block > that has a return statement with a different return type than the method > itself, i.e. if foo returns void and the announced event returns > Process then the compiler will error out saying that the return type of the > return statement inside the announce block doesn't match the return type of > the method. If the event being announced has a return type different from > the method's one but there is no return statement inside the announce block > then the code compiles just fine. Is this a bug or the intended behavior, > i.e. one can not issue return commands inside announce blocks if the return > type differs from containing method's one? You are correct in assuming that announce expressions currently do not work. Announce statements are supported but the compiler does not currently support announce expressions. The syntax shown on the example you linked is correct. Your understanding of the semantics seems also correct. Any compiler issue you are running into is most likely due to our lack of supporting announce expressions at the moment. You can see this bug report for more details and subscribe for future updates: http://sourceforge.net/tracker/?func=detail&aid=3439607&group_id=302891&atid=1276944 > Also, regarding break and continue statements, it seems that we can't use > them inside announce blocks that are nested inside while/for loops, is this > the intended behavior as well? Do you mean that this form isn't allowed: while (pred) announce E (..) { ...; continue; } This form should not be allowed. Or did you mean: announce E (..) { while (pred) { ...; continue; } } This form *should* be allowed and if it isn't working, please file a bug against it. - Robert |
From: Irineu M. de L. M. <im...@ci...> - 2012-06-03 14:55:26
|
Hello everyone, I have a few questions about the semantics for control flow statements inside announce blocks and I'd be glad if someone could kindly answer them. >From my observations it seems that any *return* statement inside an * announce* block refers to return of the event closure so that handlers and even the OO code could see the results of the announce block, as shown in the documentation <http://ptolemy.cs.iastate.edu/docs/lang.shtml#announcing>¹. However I have found an issue regarding the return type of a method and the return type of an announce block that I'd like some clarification. Right now the compiler refuses to compile methods with an announce block that has a return statement with a different return type than the method itself, i.e. if *foo* returns *void* and the announced event returns * Process* then the compiler will error out saying that the return type of the return statement inside the announce block doesn't match the return type of the method. If the event being announced has a return type different from the method's one but there is no return statement inside the announce block then the code compiles just fine. Is this a bug or the intended behavior, i.e. one can not issue return commands inside announce blocks if the return type differs from containing method's one? Also, regarding *break* and *continue* statements, it seems that we can't use them inside announce blocks that are nested inside while/for loops, is this the intended behavior as well? ¹ The example in the link shows a piece of code using the return value of the announce expression. I still haven't managed to make that work, every time I try to assign an announce expression to a variable or use it as the return value of a method, like in the example, it doesn't compile due to syntax errors. Thanks and regards, Irineu Martins de Lima Moura |
From: Robert D. <rd...@ia...> - 2012-05-08 18:03:31
|
Hi Irineu, Yes the scripts I provide for that project are set up to generate metrics, as that was what we needed. I believe if you edit the ant build.xml file you can remove the line: ckjm="true" And it will stop generating metrics, which if I recall properly will allow it to actually compile. Regarding the error, I don't recall ever seeing that particular error message. We do not support that version of the compiler (and haven't looked at it in over a year) so I recommend using our newer, OpenJDK based compiler for compiling Ptolemy programs. - Robert On Sun, May 6, 2012 at 4:00 PM, Irineu Martins de Lima Moura <im...@ci...> wrote: > Hi Robert, > > I was trying to compile the Ptolemy version for HealthWatcher available > here but I seem to be missing something as running the provided ant script > only generates metrics and doesn't seem to compile the source code. > Do you know if I have to change anything? > I was also trying to compile a small example using the japyc compiler but I > am always getting a "Semantic Error: Parameter 0 does not have a matching > context paramter" or "Semantic Error: Unknown event type ..." error > messages. The first one is rather cryptic to me and the second one should be > a side-effect of the error the caused the first. > > Hopefully you can help me and thanks for your support. > > Regards, > Irineu Moura > > > 2012/4/30 Robert Dyer <rd...@ia...> >> >> Hi Irineu, >> >> On Sat, Apr 28, 2012 at 9:00 PM, Irineu Martins de Lima Moura >> <im...@ci...> wrote: >> > I do have another question if you do not mind. >> > I saw that your team used another version of the ptolemy compiler to >> > collect >> > the metrics for your recent work on aspect interfaces. This version >> > seems to >> > support only an older syntax of the language, do you intend to add this >> > metrics gathering feature to the version that is currently distributed >> > in >> > the website? >> >> We do plan to add metrics support to the OpenJDK based Ptolemy >> compiler, but at the moment have no concrete timeline. Hopefully by >> the end of summer. >> >> > Additionally, do you have any documentation for this older >> > revision of the language? >> >> Unfortunately we lack any documentation for the (out of date) JastAdd >> version of the compiler. We are focusing all our efforts on the >> OpenJDK based compiler, as it is industrial strength and a drop-in >> replacement for javac. >> >> However, please let us know if you have any specific questions about >> the JastAdd compiler and I can try to answer them. >> >> - Robert > > -- Robert Dyer rd...@ia... |
From: Irineu M. de L. M. <im...@ci...> - 2012-05-06 21:06:11
|
Hi Robert, I was trying to compile the Ptolemy version for HealthWatcher available here<http://ptolemy.cs.iastate.edu/design-study/#metrics> but I seem to be missing something as running the provided ant script only generates metrics and doesn't seem to compile the source code. Do you know if I have to change anything? I was also trying to compile a small example using the *japyc* compiler but I am always getting a *"Semantic Error: Parameter 0 does not have a matching context paramter"* or *"Semantic Error: Unknown event type ..."*error messages. The first one is rather cryptic to me and the second one should be a side-effect of the error the caused the first. Hopefully you can help me and thanks for your support. Regards, Irineu Moura 2012/4/30 Robert Dyer <rd...@ia...> > Hi Irineu, > > On Sat, Apr 28, 2012 at 9:00 PM, Irineu Martins de Lima Moura > <im...@ci...> wrote: > > I do have another question if you do not mind. > > I saw that your team used another version of the ptolemy compiler to > collect > > the metrics for your recent work on aspect interfaces. This version > seems to > > support only an older syntax of the language, do you intend to add this > > metrics gathering feature to the version that is currently distributed in > > the website? > > We do plan to add metrics support to the OpenJDK based Ptolemy > compiler, but at the moment have no concrete timeline. Hopefully by > the end of summer. > > > Additionally, do you have any documentation for this older > > revision of the language? > > Unfortunately we lack any documentation for the (out of date) JastAdd > version of the compiler. We are focusing all our efforts on the > OpenJDK based compiler, as it is industrial strength and a drop-in > replacement for javac. > > However, please let us know if you have any specific questions about > the JastAdd compiler and I can try to answer them. > > - Robert > |
From: Robert D. <rd...@ia...> - 2012-04-30 20:01:46
|
Hi Irineu, On Sat, Apr 28, 2012 at 9:00 PM, Irineu Martins de Lima Moura <im...@ci...> wrote: > I do have another question if you do not mind. > I saw that your team used another version of the ptolemy compiler to collect > the metrics for your recent work on aspect interfaces. This version seems to > support only an older syntax of the language, do you intend to add this > metrics gathering feature to the version that is currently distributed in > the website? We do plan to add metrics support to the OpenJDK based Ptolemy compiler, but at the moment have no concrete timeline. Hopefully by the end of summer. > Additionally, do you have any documentation for this older > revision of the language? Unfortunately we lack any documentation for the (out of date) JastAdd version of the compiler. We are focusing all our efforts on the OpenJDK based compiler, as it is industrial strength and a drop-in replacement for javac. However, please let us know if you have any specific questions about the JastAdd compiler and I can try to answer them. - Robert |
From: Irineu M. de L. M. <im...@ci...> - 2012-04-29 02:00:51
|
Thanks a lot for your prompt response. I shall follow up on the bug then! I do have another question if you do not mind. I saw that your team used another version of the ptolemy compiler<http://ptolemy.cs.iastate.edu/design-study/ja-pyc.jar>to collect the metrics for your recent work on aspect interfaces. This version seems to support only an older syntax of the language, do you intend to add this metrics gathering feature to the version that is currently distributed in the website? Additionally, do you have any documentation for this older revision of the language? Thank you again and regards, Irineu Moura Em 27 de abril de 2012 12:26, Hridesh Rajan <hr...@ia...> escreveu: > Hi Irineu, Fernando: > > Thanks for your e-mail. I answer your two questions below. > > Hridesh > > On Thu, Apr 26, 2012 at 10:31 PM, Irineu Martins de Lima Moura > <im...@ci...> wrote: > > Hello Rajan, > > > > My name is Irineu Moura and I am an undergraduate student in Computer > > Science at the Informatics Center (CIn) of the Federal University of > > Pernambuco (UFPE). > > Recently I started my course conclusion graduation project which is > based in > > Ptolemy, the language designed and developed by you and your colleagues. > > Essentially the project's objectives are to (1) modularize the exception > > handling of a system (2) potentially devising one or more refactorings > and, > > if time allows, (3) conducting a case study comparing the refactored > system > > with one modularized with AspectJ, somewhat similar to your recent work. > > That is great! We look forward to hearing results from your projects. > Please do continue to report your results via the Ptolemy users > mailing list. Please also do not hesitate in asking any questions that > you may have during the course of your project. We will gladly respond > to those. > > > With that said, I would like to ask you a question that I hope you or > one of > > your colleagues will be able to answer. > > Does event announcing and handling always happen in the same thread? > I.E. is > > event announcing synchronous? Based on my observations so far, I believe > > that this is true. However, is that a language design decision or an > > implementation detail? > > Yes, an event announcement is synchronous in both semantics and in > implementation. > > > I would also like to point out a potential bug with multi-thread > announcing. > > It seems that when announcing the same event type from different threads > the > > event data for some of the events gets overwritten by the data of the > last > > announced event. > > To give you an example: > > > > Assuming that we have 2 threads announcing events of the same type > > EventType. > > Let E1(A1) | T1 be the event E1 announced in thread T1 with argument A1 > > and E2(A2) | T2 be the event E2 announced in thread T2 with argument A2. > > If E2(A2) | T2 happens just after E1(A1) | T1 then the handlers of E1 may > > see the value of A2 instead A1, and vice-versa if E1(A1) | T1 is > announced > > just after E2(A2) | T2 . > > The situation seems to get worse if we increase the number of threads, > if we > > have E1(A1) | T1, E2(A2) | T2 and E3(A3) | T3 and E3 gets announced just > > after E1 and E2 then the handlers of E1 and E2 may see only A3. > > > > The behavior can be a bit more erratic then the one described above but > that > > should give you an idea. > > I'm attaching to this email a sample project that I used to observe this > > behavior. One can easily run it by properly setting up the ant script (it > > can also be imported in Eclise). > > Thank you for pointing out this bug regarding event data being > overwritten. Robert Dyer, who is the lead student on the Ptolemy > project, is actively working on fixing this bug and it has also been > listed as a high priority bug on our bug tracking database. As soon as > we fix this problem, we will send information via the Ptolemy users > list for the new download. I have invited you to join that list. > > > I'm including my advisor, Fernando Castor, in this thread so he can be > aware > > of this information as well. > > > > Thanks in advance and regards, > > Irineu Moura > -- ------------------------------------------------------ Irineu Martins de Lima Moura |