Usually when we see something go wrong in a program's output, we have to guess what code is causing the problem. We usually guess wrong. The Whyline for Java allows you to instead ask questions about a program's output and get answers in terms of the code responsible. Click the screenshot above to watch a 90 second demonstration or download the video (5 MB). (And because I love my iPhone, here's an iPhone version too).
The Whyline work is now patented: U.S. Patent No. 7,735,066 [patent].
You can find the (unmaintained) Whyline for Java source code on GitHub.
Here are some basic requirements for using the Whyline.
.jar
file) that can be executed using a standard JVM
java.awt.Graphics
and its subclasses and textual output produced by java.io.PrintStream
and its subclasses.
Choose your platform and follow the instructions.
OS X
On first launch, the Whyline creates a folder called "Whyline" inside the application bundle to cache instrumented classes and store saved traces. You'll probably want to change this to some where in your home directory. You can do this in the preferences dialog in the Whyline, or by manually editing the plist file in which this path is stored. To change the JVM's heap size (by default, its 1 GB), right-click on the application and choose |
Windows, Linux, or other platforms with Java support
On first launch, the Whyline creates a folder called "Whyline" inside the same directory as the Whyline. If you want to change this location, you can do this in the preferences dialog in the Whyline. The path itself is stored in the registry. |
Yes, it's buggy, as are all research prototypes. If you'd like to send any feedback, send it to Andy at whyline@gmail.com. It's actually more helpful if you send it from within the Whyline using the "send feedback" button, because you can send a screenshot with your feedback.
Rather than write a bunch of text documentation, I created a brief tutorial video (25 MB). It demonstrates:
I'll post answers to other questions I get here.
Is this software actively maintained? No; I wish it was, but the software is provided AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED and all that stuff. It's a research prototype and very buggy! If you find bugs, send them to whyline@gmail.com with lots of detail about the context of the problem and preferably a screenshot or two. Andy Ko was and is the sole author of the software and probably won't have time to address these issues quickly, as he is currently graduating and moving on to a new research position in the fall.
Is it open source? Not yet. I haven't released the source yet because of a provisional patent jointly owned by CMU, my advisor Brad Myers and myself. I'm trying to get them to allow me to release it anyway. That would certainly make it easier to maintain it!
Can you help me to make it work for my program? I wish I had time to help everyone because I want to get the idea out there. The best I can do for now is collect bug reports and try to get the source released. As people ask questions, I'll try to update the documentation on this page with workarounds.
Is there an Eclipse plug-in? No, not yet. Wanna write one? The Whyline is implemented independent of any Eclipse APIs; it just needs to be launched from the standard Eclipse launch configuration platform.
I've published much about the implementation of the Whyline for Java in a paper at the International Conference on Software Engineering in 2008, which won one of a few distinguished paper awards.
Ko, A.J. and Myers, B.A. (2008) Debugging Reinvented: Asking and Answering Why and Why Not Questions about Program Behavior. International Conference on Software Engineering (ICSE), Leipzig, Germany, May 10-18. pp. 301-310.
Andrew J. Ko and Brad A. Myers. (2009) Finding Causes of Program Output with the Java Whyline, Proceedings CHI'2009: Human Factors in Computing Systems. Boston, MA, April 4-9, 2009. pp. 1569-1578.
Brad A. Myers and Andrew J. Ko (2010). Debugging Interface. US Patent Number 7,735,066. Issued: June 8, 2010. Filed October 7, 2005. claiming priority to provisional filed October 8, 2004. pdf
CARNEGIE MELLON UNIVERSITY (CMU) MAKES NO WARRANTIES OF ANY KIND, EITHER EXPRESSED OR IMPLIED AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, WARRANTY OF FITNESS FOR PURPOSE, OR MERCHANTABILITY, EXCLUSIVITY OR RESULTS OBTAINED FROM SPONSOR'S USE OF ANY INTELLECTUAL PROPERTY DEVELOPED UNDER THIS AGREEMENT, NOR SHALL EITHER PARTY HERETO BE LIABLE TO THE OTHER FOR INDIRECT, SPECIAL, OR CONSEQUENTIAL DAMAGES SUCH AS LOSS OF PROFITS OR INABILITY TO USE SAID INTELLECTUAL PROPERTY OR ANY APPLICATIONS AND DERIVATION THEREOF. CMU DOES NOT MAKE ANY WARRANTY OF ANY KIND WITH RESPECT TO FREEDOM FROM PATENT, TRADEMARK, OR COPYRIGHT INFRINGEMENT, OR THEFT OF TRADE SECRETS AND DOES NOT ASSUME ANY LIABILITY HEREUNDER FOR ANY INFRINGEMENT OF ANY PATENT, TRADEMARK, OR COPYRIGHT ARISING FROM THE USE OF THE PROGRAM, INFORMATION, INTELLECTUAL PROPERTY, OR OTHER PROPERTY OR RIGHTS GRANTED OR PROVIDED TO IT HEREUNDER. THE USER AGREES THAT IT WILL NOT MAKE ANY WARRANTY ON BEHALF OF CMU, EXPRESSED OR IMPLIED, TO ANY PERSON CONCERNING THE APPLICATION OF OR THE RESULTS TO BE OBTAINED WITH THE PROGRAM UNDER THIS AGREEMENT. USERS ACKNOWLEDGE THAT THE PROGRAM IS A RESEARCH TOOL STILL IN THE DEVELOPMENT STAGE, THAT IT IS BEING SUPPLIED "AS IS," WITHOUT ANY ACCOMPANYING SERVICES OR IMPROVEMENTS FROM CMU.