1 / 14

Visualizing Type Error Messages

Visualizing Type Error Messages. Allison Thompson CSCI 5535 Spring 2010. Motivation. This expression has type int but is here used with type float. This expression has type my_type but is here used with type my_type. Outline. Motivation Tools: Processing and S eminal ViSeR

deana
Télécharger la présentation

Visualizing Type Error Messages

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Visualizing Type Error Messages Allison Thompson CSCI 5535 Spring 2010

  2. Motivation This expression has type int but is here used with type float This expression has type my_type but is here used with type my_type

  3. Outline • Motivation • Tools: Processing and Seminal • ViSeR • Conclusion

  4. Outline • Motivation • Tools: Processing and Seminal • ViSeR • Conclusion

  5. Pros and Cons of Processing • Easy • Didn’t require learning new language • Free • Based on Java 1.4.2 (limited) • Does not always run very fast • Visualization can take 4-5 sec to load; then 4-5 for each refresh

  6. Seminal: Searching for Error Messages INAdvanced Languages • Enumerate local changes to abstract syntax tree that may remove type errors • Search for places to try changes • Use type checker to evaluate changes • Rank changes and present to user

  7. Seminal Results: 1 + 2.5;; ------------------------------------------------------------------ File "test1.ml", line 1, characters 4-7: This expression has type float but is here used with type int Relevant code: 2.5 ------------------------------------------------------------------ File "test1.ml", line 1, characters 4-7: Try replacing 2.5 with 2.5; [[...]] of type int within context 1 + (2.5; [[...]]);; ============================== File "test1.ml", line 1, characters 2-3: Try replacing + with +; [[...]] of type int -> float -> 'a within context (1 +; [[...]] 2.5);; ============================== File "test1.ml", line 1, characters 4-7: Try replacing 2.5 with 2.5; [[...]] of type int within context 1 + (2.5; [[...]]);; wildcard replacement with type int

  8. Outline • Motivation • Tools: Processing and Seminal • ViSeR • Conclusion

  9. ViSeR: Visualization for Seminal Results • Goals: • Put Seminal suggestions in context with some form of helpful visualization • Minimize need for user to learn new symbols/etc – improve usability and understandability • Avoid re-introducing confusion: This expression has type int but is here used with type float

  10. ViSeR: Examples and Screenshots 1 + 2.5;; File "test1.ml", line 1, characters 4-7: Try replacing 2.5 with 2.5; [[...]] of type int within context 1 + (2.5; [[...]]);; wildcard replacement with type int This expression has type int but is here used with type float

  11. ViSeR: Examples and Screenshots actual error error location according to OCaml This expression has type int but is here used with type float

  12. Outline • Motivation • Tools: Seminal and Processing • ViSeR • Conclusion

  13. Conclusion • Success? • Put Seminal results in context • Provide improvement in usability • Remaining Issues/Future Work • ViSeR as a tool is limited/slow • Several situations doesn’t cover; doesn’t gracefully handle proper compilation • 4-5 seconds for some visualizations is too slow ✓ ✗

  14. Questions?

More Related