|
|
|
Andrew J. Ko Assistant Professor Box 352840 Seattle, WA 98195
206-221-0352 Interested in a Ph.D. in HCI or software engineering? Apply to the iSchool or CSE and work with me as part of dub! If you're already a student at UW, let's chat. 09.22.09 presented Attitudes in Young Adults' Computing Autobiographies06.29.09 VL/HCC paper on code autobiographies to appear05.30.09 FSE paper rejected for using qualitative methods05.23.09 presented The State of the Art in EUSE at SEEUP05.15.09 presented to the iSchool founding board01.15.09 my CHI '09 paper was accepted.11.05.08 I gave a talk at DUB.09.16.08 I am now faculty at UW. Come do research with me!05.10.08 I've posted the 05.08.08 I submitted my dissertation!04.15.08 I'm finally back in Pittsburgh, takin' it easy, writing a few journal papers :)03.16.08 My Whyline for Java paper won distinguished paper award at ICSE 2008!02.28.08 read L'Sociopath01.28.08 posted the ICSE '08 Whyline paper01.8.08 peering through panels01.6.08 parity12.29.07 read road11.13.07 finished misadventure 10108.15.07 finished the whole is elucidated08.07.07 poetry by yours, (truly!)07.25.07 wow, it's been a while. i've been a bit bookish lately, reading Sophie's World and No Country for Old Men.06.12.07 finished a chilling killing05.29.07 Finished Flowers for Algernon.05.25.07 Posted slides for my ICSE 2007 talk.05.21.07 Finished Wharton's Summer.05.11.07 Ellen did a wonderful job at her first violin recital!05.06.07 Yay! New colors.05.06.07 Finished Pride and Prejudice.05.04.07 Added a collection of Ellen quotes.04.29.07 Reorganized reading page chronologically and hid the comments until a mouse over. Added a comment on Fausto-Sterling.04.28.07 Yes, animation can be annoying. But I needed an excuse to play with Javascript. You can put up with it for a while.04.26.07 The fifty first state04.20.07 Comments on My Mortal Enemy and yay for sepia! 04.12.07 Comments on Frankenstein and new fwf entry. 04.04.07 Posted comments L'Engle's Wrinkle. 03.06.07 Remembered a bunch of books I read!03.02.07 Added page about fwf02.27.07 finished Dubliners02.26.07 musing: dying02.24.07 musing: war and sacrifice02.18.07 finished Slaughterhouse-Five02.15.07 added some summaries to reading list02.12.07 posted EUSE SIG for CHI 0702.09.07 added Ackerman quote02.08.07 musing: race me01.27.07 musing: mediated living01.06.07 bit of a site redesign |
Citrus
Graphical structured editors for code and data have many benefits over editing raw XML, but they can be difficult and time-consuming to build using modern programming languages. Citrus is a new object-oriented, interpreted language that is designed to simplify the creation of such editors, by providing first-class language support for one-way constraints, custom events and event handlers, and value restrictions and validation. We're using Citrus to implement several novel software development tools. Fortunately, these editors have many of the same architectural requirements:
We designed Citrus, a new programming language, to support these these architectural patterns as first class language constructs. Citrus is object-oriented, interpreted, reflective, statically-typed, and polymorphic. objects and propertiesJust like any other object-oriented language, at runtime Citrus programs consist of many objects, which have several fields that are pointers to other objects. This pointers are a single value, representing the location of an object in memory. In Citrus, these pointers are objects themselves. We call them properties. Properties have lots of additional meta-information in addition to their value, including listeners, restrictions, constraints, owners, and other information. ownershipOne unique feature of properties is that they either own or refer to their value. This was driven by the observation that the data in structured editors frequently represent trees or DAGs. Consequently, programmers frequently need to write code to determine what owns or contains an object (for example, a view's parent or a statement's block in an AST). They also frequently need to determine what references an object (for example, a method's callers or a model's views). To access this data, programmers have to implement custom functions or manually maintain references. To minimize this work, in Citrus, properties have back-pointers to the object that owns them, and objects have a set of properties that point to them. Each object thus has a single property that owns it and a set of properties that refer to it. All of these backpointers are managed by the runtime automatically. Let's look at some examples of where these backpointers become useful. The first example shows a label in a button. To programatically access the button from the label, we only need a single line of code # The button that contains this label label.owner The second example shows an object in a graphical editor. We only need a single call to the ownerOfType method to look up the hierarchy of owners to find the ScrollView that contains the square. # The ScrollView that contains this circle. (circle ownerOfType ScrollView) The third example shows a model and its three views. We can access all of the views that reference the model with this single call to the refsOfType method. # Views of this object (model refsOfType View) To find all of Identifiers in the abstract syntax tree that reference the method, for example, as part of renaming the method, we only need this single call to refsOfType. ‰χέ # All Identifiers that refer to this method (method refsOfType Identifier) constraintsThe central way to maintain relationships in Citrus is through constraints. Constraints are one-way, like the constraints in Amulet and Subarctic toolkits, but arbitrary code can be used, and dependencies are gathered automatically instead of having to explicitly declare them. In this example, the dependencies include all properties accessed inside the previousView function, and the right property. |