From: Vladimir R. <va...@sk...> - 2003-04-24 19:21:53
|
On Wed, Apr 23, 2003 at 08:13:30PM +0800, Grzegorz Jakacki wrote: > Vladimir, > > Thanks for your feedback. Detailed comments below: > > > 2. I found that new STL (coming with gcc v3.2.2) is little more > > complex than `occ' expect, namely in parsing some template > > typedefs. Some dumb workaround leads to infinite loop in type > > analyzing stage (many parser-alike progs has same property :-) > > It seems to me that I have been fixing something similar in still > experimental templates branch. Very interesting! I will upgrade to 2.6.1 soon and will see template branch > > > Currently i have a version which works fine (skipping some code, > > so it is very dirty hack). It is possible to investigate it > > (may be too late, if new version parses new STL fine). > > So, possibly this topic is not actual now. > > What is your fix exactly? This was hack, not a fix :-) Any fix will be reported immediately, sure. > > > 3. I found that classwalker gives more attention for class/method > > than non-OO code. So, automatic variables are not user-keyword > > sensitive (if i understand it properly :-) Some additions make > > it more care, and automatic variables are handling well. > > If you have any code that can extend existing functionality we can talk > about incorporating it into occ. First i hope to carry out handling code from general walker to user class by standard for occ way, then i will able to send a patch for observation. > > > Currently we constructed first version of T++->(C++,TSS) converter using `occ'. > > T++ is a `superfunctional' language for supercomputers, and has > > seven additional keywords: tfun, tval, tptr, tout, twait, tdrop, tct. > > > > For instance, Fibonacci program looks like: > > > > #include <stdio.h> > > > > tfun int fib (int n) { > > return n < 2 ? n : fib(n-1)+fib(n-2); > > } > > > > tfun int main (int argc, char **argv) { > > if (argc != 2) { printf("Usage: fib <n>\n"); return 1; } > > int n = atoi(argv[1]); > > printf("fib(%d) = %d\n", n, (int)fib(n)); > > return 0; > > } > > > > Running on multicomputer, it will do all recursions in parallel. > > Wow, cool. > I see only one additional feature we for our current purposes: We need user-defined keyword `tct` with parameters: Someone can write: tfun tct((stack(4096),prio(5))) f(int x) { ... } it means that LWP for function f should have stack size = 4096 bytes and macroscheduler priority = 5 Another case: tval A a = new tval tct((extent(2048))) A; Here we expect to allocate synchronized value with type A and 2048 bytes after it, accessible from all cluster nodes (i.e. inform system about additional memory which should be transferred during access) Your can consider 'tct' (T-context info) like __attribute__ in gcc. So it is not a new idea And there is some objectives to support user keywords with parameters: Any real language extension has dilemma: to put maximal information to minimal set of new keywords. Parameterization can solve this problem: we can introduce few very often used keywords, and reserve one with many parameters for other cases. occ supports keywords with parameters, it is great!!! i hope it will work :-) -- Best regards, Vladimir |