Скачать презентацию Automated Extraction of JPF Options and Documentation Wojciech Скачать презентацию Automated Extraction of JPF Options and Documentation Wojciech

65f824ea2c1bec0320c3321aa4f8dc52.ppt

  • Количество слайдов: 8

Automated Extraction of JPF Options and Documentation Wojciech Luks Oksana Tkachuk David Bushnell Automated Extraction of JPF Options and Documentation Wojciech Luks Oksana Tkachuk David Bushnell

JPF Projects Configuration ✦ The Good • Highly configurable • Variety of options • JPF Projects Configuration ✦ The Good • Highly configurable • Variety of options • Variety of extension mechanisms ✦ The Bad and The Ugly • Missing documentation • Mismatches between code and docs • Duplicate options, values

Architecture JPF Wiki Pages Projects JPF-Auto. Doc-Options Bytecode Parser (jpf-core) Static Analyzer XML Generator Architecture JPF Wiki Pages Projects JPF-Auto. Doc-Options Bytecode Parser (jpf-core) Static Analyzer XML Generator (Castor) XML Wiki Generator

Examples: Options Java source Opt Byte. Code snippets print. Insn = config. get. Boolean( Examples: Options Java source Opt Byte. Code snippets print. Insn = config. get. Boolean("et. print_insn", false); ldc @6(et. print_insn) iconst_0 invokevirtual @7("gov/nasa/jpf/Config", "get Boolean", "(Ljava/lang/String; Z)Z") Annot @JPFOption(type = "Boolean", key = "et. print_insn", default. Value = "true", comment = "print executed bytecode instructions") Lgov/nasa/jpf/annotation/JPFOption; value. Count=4 type="Boolean” key="et. print_insn” default. Value="true” comment="print executed bytecode instructions” ✦ Tracking 32 APIs of the Config class ✦ Detecting mismatches

Examples Java source Byte. Code snippets Logger static Logger log = JPF. get. Logger( Examples Java source Byte. Code snippets Logger static Logger log = JPF. get. Logger("gov. nasa. jpf. listener. Idle. Filter"); ldc @73(gov. nasa. jpf. listener. Idle. Filter) invokestatic @74("gov/nasa/jpf/JPF", "get. Logger", "(Ljava/lang/String; ) Lgov/nasa/jpf/util/ JPFLogger; ") CG vm. get. System. State(). set. Next. Choice. Generator (cg); aload_1 invokevirtual @241("gov/nasa/jpf/jvm/System State", "set. Next. Choice. Generator", "(Lgov/nasa/jpf/jvm/Cho ice. Generator; )Z") DCSF Direct. Call. Stack. Frame frame = new Direct. Call. Stack. Frame(main. Stub, 1, 0); invokevirtual @207("gov/nasa/jpf/jvm/Direct Call. Stack. Frame", "push. Ref", "(I)V")

Output Documentation Option et. print_insn - print executed bytecode instructions defined in: gov. nasa. Output Documentation Option et. print_insn - print executed bytecode instructions defined in: gov. nasa. jpf. listener. Exec. Tracker Type: Boolean Default: True used in: gov. nasa. jpf. listener. Exec. Tracker Type: Boolean Default: False Logger Class: gov. nasa. jpf. listener. Idle. Filter Type: gov. nasa. jpf. listener. Idle. Filter Method: JPF. get. Logger CG Class: gov. nasa. jpf. jvm. MJIEnv Method: set. Next. Choice. Generator DCSF Class: gov. nasa. jpf. jvm. JVM Method: push. Main. Entry

Experience ✦ Case Studies • jpf-core • jpf-awt • jpf-bfs ‣ Spelling errors ‣ Experience ✦ Case Studies • jpf-core • jpf-awt • jpf-bfs ‣ Spelling errors ‣ Double definition for an option ✦ Limitations • Local analysis • Does not handle dynamic • Generates “dynamic” keys and values ✦ Future work • jpf-autodoc-types • Feedback from the users 7

Demo ✦ JPF-Auto. Doc-Options in Action ✦ Check out from http: //code. google. com/p/jpf-autodoc-options/ Demo ✦ JPF-Auto. Doc-Options in Action ✦ Check out from http: //code. google. com/p/jpf-autodoc-options/