User loginNavigation |
archivesStronger relationships between structuresLets say you're compiler uses the following structures to represent a function type and a class to represent a function declaration: class FuncType extends Type { List<Type> params; Type ret; } class FuncDecl { String name; FuncType type; List<String> paramNames; } There objects "FuncDecl.type.params" and "FuncDecl.paramNames" are related in ways that aren't expressed in the source code of the two class declarations. For example, each entry in the "paramNames" list matches up with the corresponding type in the "type.params" list. I've been thinking about "paramNames" as adding attributes to the "FuncType" data structure. So paramNames would actually be a "map" data structure whose keys are structural references to parameter types and whose values are strings. Something like: class FuncDecl { String name; FuncType type; Map<#type#,String> paramNames; } FuncDecl d = ...; d.paramNames.put(#params[0]#", "dst"); // The "params" refers to the list in "type" d.paramNames.put(#params[1]#", "src"); ... The best concrete solution I can come up with isn't satisfying: class FuncType<ExtraParamInfo,ExtraReturnInfo> { List<Pair<Type,ExtraParamInfo>> paramets; Pair<Type,ExtraReturnInfo> ret; } class FuncDecl { Type<String,Void> typeAndParamNames; } Is there a language or type system that does a good job of expressing such relationships? By Kannan Goundan at 2007-02-06 09:47 | LtU Forum | login or register to post comments | other blogs | 4556 reads
Opinions on _Theoretical Introduction to Programming_?I happened to find (and purchase) Theoretical Introduction to Programming by Bruce Mills (Springer, ISBN 978-1846280214) at my local bookstore. I've been patiently digesting it for a few days now, and it's already given me a couple of fine insights into programming that I hadn't realised in my 20+ years in the field. Has anyone else seen this book? I was actually a bit surprised to search LtU and find no mention of it. My own opinion is that while it could benefit from a good editor, and I wish the author would spend more than a paragraph or two on some of the subjects mentioned, it's been a good purchse overall. Programming Parallel AlgorithmsProgramming Parallel Algorithms, Guy Blelloch. 1996.
IIRC, the team developing Fortress is putting nested data parallelism into Fortress. I think this is one of the most intriguing ways of getting heavy duty parallelism -- something that will grow ever more important as the number of cores in our computers grow. ACM Queue: Realtime Garbage Collection
The article is primarily about the Metronome garbage collection technology, but includes a nice introduction to garbage collection and realtime terminology as well. Programming Shorthands
An interesting and odd paper from Todd Proebsting (of "Proebsting's Law"fame) and Ben Zorn. If you like $_ and @_ in Perl, then you may like this, too. I can't recall seeing any other papers on this topic, so pointers are welcome. Iterative contract development?Seems like there are lots of folks who don't want to go to the trouble of defining contracts or assertions (much) either before or during software development. However, when it comes time to find and fix bugs, there might be more desire to tighten things down. I've heard of tools that will run your code a zillion times and try to figure out constraints for it (MrFlow is one thing I can think of, but it is apparently more of a static checker). I have not used them so this is a naive question: might such a system work interactively with the developer to construct and refine contracts? Pick a method, and the system starts an interactive Q & A to define and narrow the contract based on the function signiture and any additional information from static analysis, and from having run the code in various ways. The idea would be to work with the developer / maintainer to over time refine assumptions about the code to find bugs. By raould at 2007-02-06 22:47 | LtU Forum | login or register to post comments | other blogs | 4905 reads
|
Browse archivesActive forum topics |
Recent comments
22 weeks 14 hours ago
22 weeks 18 hours ago
22 weeks 18 hours ago
44 weeks 1 day ago
48 weeks 3 days ago
50 weeks 1 day ago
50 weeks 1 day ago
1 year 4 days ago
1 year 5 weeks ago
1 year 5 weeks ago