OK, so what can a person download from where to use this? On 10/28/2010 10:11 PM, Myoungkyu Song wrote: > > >So for an X10 programmer to use this, what do they need? > > An X10 programmerneeds our separate tool: the PBSE translator and the > code-generator (related to JUnit API). > > >So they need a version of the compiler that includes some code from > your group..? > > We tested x10 sources under x10c-version-2.0.4, in order to generate > the corresponding Java files. > > >They need a separate tool which knows how to process .pbse files, and > apply them to X10 source? > > Yes, they need a separate tool which is the PBSE translator which can > be parameterized by PBSE to apply to Java source files generated from X10. > > >If so, does your tool understand X10 AST structure/type structure etc.? > > Rather than understanding X10 AST/Type directly, we used Java AST > toolkit from Eclipse JDT. Since we managed X10-PBSE version and > JAVA-PBSE one, when the X10 programmers write X10-PBSE version, our > tool converts the PBSE into JAVA-PBSE version. > > Best regards, > > Myoungkyu Song > > *From:*Vijay Saraswat [mailto:vi...@saraswat.org] > *Sent:* Thursday, October 28, 2010 9:42 PM > *To:* Myoungkyu Song > *Cc:* Eli Tilevich > *Subject:* Re: [X10-users] JUnit ??? > > So for an X10 programmer to use this, what do they need? > > So they need a version of the compiler that includes some code from > your group..? > > They need a separate tool which knows how to process .pbse files, and > apply them to X10 source? (If so, des your tool understand X10 AST > structure/type structure etc.)? > > Also can you reply to the list? > > On 10/28/2010 9:33 PM, Myoungkyu Song wrote: > > Hello, Vijay > > I am not sure if our approach fits with what you tried to do, but let > me explain our idea. Our approach consists of writing an X10 source > (TestCompute.java) and PBSE metadata specifications (TestCompute.pbse > & x10_to_java.pbse). It is necessary to declare your methods in the > PBSE specification. Then, the generated Java source (TestCompute.java) > from X10 is annotated with JUnit annotation. Attached is the JUnit > test driver class which can be generated automatically by our tool. > And I added our submitted IPDPS and AOSD2010 papers which explain the > details. > > Best regards, > > Myoungkyu Song > > //--------------------------------------------------- > > // TestCompute.x10 > > //--------------------------------------------------- > > packagecompute; > > importx10.io.Console; > > publicclass TestCompute { > > publicdef testAQuadCompute() { > > var l:double= 0; > > var r:double= 100; > > var sum:double= 2.5005000000000417E7; > > val result = Compute.AQuad.computeArea(l, r); > > Console.OUT.println("AQuad Result: " + result); > > JUnitTestDriver.assertEquals(sum, result); > > } > > publicdef testSQuadCompute() {..} > > publicdef testFQuadCompute() {..} > > publicdef testDQuadCompute() {..} > > } > > //--------------------------------------------------- > > // TestCompute.pbse > > //--------------------------------------------------- > > Metadata MyJUit<Package p> > > Class c in p > > Where(publicclass Test*) > > Method<c> > > Metadata Method<Class c> > > Method m in c > > Where (publicdef test*) > > m...@test > > MyJUnit<"compute"> > > //--------------------------------------------------- > > // x10_to_java.pbse > > //--------------------------------------------------- > > MetaMetadata PBSEX10toJava<PBSE x10> > > where w in x10 > > Class c in w > > Where (public struct *) > > Replace "struct" with "class" > > Field f in w > > Where (private * ${temp1}:${temp2}) > > Switch ${temp1} and ${temp2} > > Where (private * *:*) > > Replace ":" with "\s" > > Where (private val *:*) > > Replace "val" with "final" > > Where (private var *:*) > > Remove "var" > > Method m in w > > Where (* def *:${returntype}) > > Replace "def" with ${returntype} > > //--------------------------------------------------- > > // TestCompute.java > > //--------------------------------------------------- > > packagecompute; > > importorg.junit.Test; > > publicclass TestCompute extendsx10.core.Ref { > > publicstatic final x10.rtt.RuntimeType<compute.TestCompute> _RTT = > new > x10.rtt.RuntimeType<compute.TestCompute>(compute.TestCompute.class, > new x10.rtt.Type[] { x10.rtt.Types.runtimeType(java.lang.Object.class) }); > > publicx10.rtt.RuntimeType getRTT() { > > return_RTT; > > } > > @Test > > publicvoid testAQuadCompute() { > > doublel = ((double) (int) (((int) (0)))); > > doubler = ((double) (int) (((int) (100)))); > > doublesum = 2.5005000000000417E7; > > finaldouble result = compute.Compute.AQuad.computeArea((double) (l), > (double) (r)); > > x10.io.Console.OUT.println((("AQuad Result: ") + (result))); > > compute.JUnitTestDriver.assertEquals((double) (sum), > (double) (result)); > > } > > @Test > > publicvoid testSQuadCompute() { .. } > > @Test > > publicvoid testFQuadCompute() { .. } > > @Test > > publicvoid testDQuadCompute() { .. } > > publicTestCompute() { > > super(); > > } > > } >
------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ X10-users mailing list X10-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/x10-users