X O T C L — a N O B J E

Total Page:16

File Type:pdf, Size:1020Kb

X O T C L — a N O B J E Proceedings of the 7th USENIX Tcl/Tk Conference Austin, Texas, USA, February 14–18, 2000 X O T C L — A N O B J E C T - O R I E N T E D S C R I P T I N G L A N G U A G E Gustaf Neumann and Uwe Zdun THE ADVANCED COMPUTING SYSTEMS ASSOCIATION © 2000 by The USENIX Association. All Rights Reserved. For more information about the USENIX Association: Phone: 1 510 528 8649; FAX: 1 510 548 5738; Email: [email protected]; WWW: http://www.usenix.org. Rights to individual papers remain with the author or the author's employer. Permission is granted for noncommercial reproduction of the work for educational or research purposes.This copyright notice must be included in the reproduced paper. USENIX acknowledges all trademarks herein. XÇÌcÐ ß aÒ Çb jecعÇÖieÒØed ËcÖiÔØiÒg ÄaÒgÙage GÙ×Øaf ÆeÙÑaÒÒ ÍÛe ZdÙÒ DeÔaÖØÑeÒØ Óf ÁÒfÓÖÑaØiÓÒ ËÝ×ØeÑ× ËÔeci¬caØiÓÒ Óf ËÓfØÛaÖe ËÝ×ØeÑ× ÎieÒÒa ÍÒiÚeÖ×iØÝ Óf EcÓÒÓÑic× aÒd BA ÍÒiÚeÖ×iØÝ Óf E××eÒ AÙ×ØÖia GeÖÑaÒÝ gÙ×ØafºÒeÙÑaÒÒ@ÙÒi¹e××eÒºde ÙÛeºÞdÙÒ@ÙÒi¹e××eÒºde ×Ý×ØeÑ ÛiØh aÙØÓÑaØic cÓÒÚeÖ×iÓÒº AÐÐ iÒØegÖaØed Ab×ØÖacØ cÓÑÔ ÓÒeÒØ× ´aÔÔÐicaØiÓÒ ×Ô eci¬c eÜØeÒ×iÓÒ× ØÝÔicaÐÐÝ ÛÖiØØeÒ iÒ Cµ Ù×e Øhe ×aÑe ×ØÖiÒg iÒØeÖface fÓÖ aÖ¹ Ìhi× ÔaÔ eÖ de×cÖib e× Øhe Ób jecعÓÖieÒØed ×cÖiÔØiÒg gÙÑeÒØ Ôa××iÒgº ÌheÖefÓÖe Øhe×e cÓÑÔ ÓÒeÒØ× aÙØÓ¹ ÐaÒgÙage XÇÌcÐ ´EÜØeÒded ÇÌcе¸ Ûhichi×aÚaÐÙe ÑaØicaÐÐÝ ¬Ø ØÓgeØheÖ aÒd caÒ be ÖeÙ×ed iÒ ÙÒÔÖe¹ added ÖeÔÐaceÑeÒØ Óf ÇÌcк ÇÌcÐ iÑÔÐeÑeÒØ× dicØed ×iØÙaØiÓÒ× ÛiØhÓÙØ chaÒgeº ÁÒ [¾7] aÒd [¾5]iØi× dÝÒaÑic aÒd iÒØÖÓ×Ô ecØiÚe ÐaÒgÙage ×ÙÔÔ ÓÖØ fÓÖ Ô ÓiÒØed ÓÙØ ØhaØ cÓÑÔÓÒeÒØ fÖaÑeÛÓÖk× haÚe ÔÖÓÚeÒ Ób jecعÓÖieÒØaØiÓÒ ÓÒ ØÓÔ Óf Ìcк XÇÌcÐ iÒcÐÙde× ØÓ ÔÖÓÚide a high degÖee Óf cÓ de ÖeÙ×e¸ aÒd aÖe ÛeÐÐ Øhe fÙÒcØiÓÒaÐiØÝ Óf ÇÌcÐ bÙØ fÓ cÙ×e× ÓÒ Øhe cÓÒ¹ ×ÙiØed fÓÖ ÖaÔid aÔÔÐicaØiÓÒ deÚeÐÓÔÑeÒغ ÁØ i× aÖgÙed ×ØÖÙcØiÓÒ¸ ÑaÒageÑeÒظ aÒd adaÔØaØiÓÒ Óf cÓÑÔÐeÜ ØhaØ aÔÔÐicaØiÓÒ deÚeÐÓÔ eÖ× ÑaÝ cÓÒceÒØÖaØe ÔÖiÑaÖ¹ ×Ý×ØeÑ׺ iÐÝ ÓÒ Øhe aÔÔÐicaØiÓÒ Øa×k¸ ÖaØheÖ ØhaÒ iÒÚe×ØiÒg ef¹ ÁÒ ÓÖdeÖ ØÓ cÓÑbiÒe Øhe b eÒe¬Ø× Óf ×cÖiÔØiÒg ÐaÒ¹ fÓÖØ× iÒ ¬ØØiÒg cÓÑÔ ÓÒeÒØ× ØÓgeØheÖº ÌheÖefÓÖe¸ iÒ gÙage× ÛiØh adÚaÒced Ób jecعÓÖieÒØed ØechÒiÕÙe׸ Ûe ÑaÒÝ aÔÔÐicaØiÓÒ× ×cÖiÔØiÒg ÐaÒgÙage× aÖe ÚeÖÝ Ù×e¹ eÜØeÒded ÇÌcÐ iÒ ÚaÖiÓÙ× ÛaÝ×: Ïe deÚeÐÓÔ ed Øhe fÙÐ fÓÖ a fa×Ø aÒd high¹ÕÙaÐiØÝ deÚeÐÓÔÑeÒØ Óf ×Ófع ¬ÐØeÖ a× a ÔÓÛeÖfÙÐ adaÔaØiÓÒ ØechÒiÕÙe aÒd aÒ iÒ¹ ÛaÖeº ÀaØØÓÒ [½6] Ô ÓiÒØ× ÓÙØ ØhaØ Øhe Ù×e Óf Ób jecع ØÙiØiÚe ÑeaÒ× fÓÖ Øhe iÒ×ØaÒØiaØiÓÒ Óf ÐaÖge ÔÖÓgÖaÑ ÓÖieÒØaØiÓÒ iÒ ÐaÒgÙage× Ðike C·· dÓ e× ÒÓØ ¬Ø Øhe ×ØÖÙcØÙÖe׺ ÁÒ ÓÖdeÖ ØÓ eÒabÐe Ób jecØ× ØÓ acce×× ×eÚ¹ hÙÑaÒ Öea×ÓÒiÒg ÔÖÓ ce×× ÚeÖÝ ÛeÐк ÁÒ [¾5]Ûe aÖgÙe eÖaÐ addiØiÓÒ¹cÐa××e× Ûe iÑÔÖÓÚed Øhe ­eÜibiÐiØÝ Óf ØhaØ Øhe ideÒØi¬ed de¬cieÒcie× dÓ ÒÓØ aÔÔÐÝ aØ Øhe ÑiÜiÒ ÑeØhÓ d× bÝ eÒhaÒciÒg Øhe Ób jecØ ÑÓ deÐ ÛiØh ×aÑe degÖee ÓÒ Ób jecعÓÖieÒØed ×cÖiÔØiÒg ÐaÒgÙage׺ Ô eÖ¹Ób jecØ ÑiÜiÒ׺ ÏeiÒØegÖaØed Øhe Ób jecØ ×Ý×ØeÑ ÌcÐ i× eÕÙiÔÔ ed ÛiØh fÙÒcØiÓÒaÐiØie× Ðike dÝÒaÑic ÛiØh Øhe ÌcÐ ÒaÑe×Ôace cÓÒceÔØ ØÓ ÔÖÓÚide Òe×Øed ØÝÔiÒg¸ dÝÒaÑic eÜØeÒ×ibiÐiØÝ aÒd Öead»ÛÖiØe iÒ¹ cÐa××e× aÒd dÝÒaÑic Ób jecØ aggÖegaØiÓÒ׺ ÅÓÖeÓÚeÖ¸ ØÖÓ×Ô ecØiÓÒ¸ ØhaØ ea×e Øhe gÐÙeiÒg ÔÖÓ ce×× Óf cÓÒ¹ ÛeiÒØÖÓ dÙced a××eÖØiÓÒ× aÒd ÑeØa¹daØa ØÓ iÑÔÖÓÚe ×ØÖÙcØiÒg ×Ý×ØeÑ× fÖÓÑ cÓÑÔ ÓÒeÒØ׺ ÇÌcÐ eÜØeÒd× ÖeÐiabiÐiØÝ aÒd ×eÐf¹dÓ cÙÑeÒØaØiÓÒº Øhe×e iÑÔ ÓÖØaÒØ feaØÙÖe× Óf ÌcÐ bÝ Ó«eÖiÒg Ób jecع ÓÖieÒØaØiÓÒ ÛiØh eÒcaÔ×ÙÐaØiÓÒ Óf daØa aÒd ÓÔ eÖa¹ ØiÓÒ׸ ×iÒgÐe aÒd ÑÙÐØiÔÐe iÒheÖiØaÒce¸ a ØhÖee ÐeÚeÐ ½ ÁÒØÖÓ dÙcØiÓÒ cÐa×× ×Ý×ØeÑ ba×ed ÓÒ ÑeØa¹cÐa××e׸ aÒd ÑeØhÓ d chaiÒiÒgº ÁÒ×Øead Óf a ÔÖÓØecØiÓÒ ÑechaÒi×Ñ ÇÌcÐ ÔÖÓÚide× Öich Öead»ÛÖiØe iÒØÖÓ×Ô ecØiÓÒ faciÐiØie׸ XÇÌcÐ ´ÔÖÓÒÓÙÒced eÜÓØickÐeµ i× aÒ Ób jecعÓÖieÒØed Ûhich aÐÐÓÛ ÓÒe ØÓ chaÒge aÐÐ ÖeÐaØiÓÒ×hiÔ× dÝÒaÑi¹ ×cÖiÔØiÒg ÐaÒgÙage ÔÖÓÚidiÒg ×eÚeÖaÐ iÑÔÖÓÚeÑeÒØ× caÐÐݺ ØaÖgeØed aØ Øhe deÚeÐÓÔÑeÒØ aÒd ÑaÒageÑeÒØ Óf ÐaÖge ×Ý×ØeÑ׺ Ìhe ba×e Óf ÓÙÖ ÛÓÖk Ûa× Øhe ÇÌcи Ïe cÓÒØiÒÙed aÒd eÜØeÒded Øhe de×igÒ ÔhiÐÓ×Ó¹ Ûhich i× a ÌcÐ eÜØeÒ×iÓÒ iÒØÖÓ dÙciÒg a dÝÒaÑic ÔhÝ Óf ÌcÐ aÒd ÇÌcÐ Óf ÔÖÓÚidiÒg fÖeedÓÑ ÖaØheÖ Ób jecØ aÒd cÐa×× ÑÓ deÐ bÝ Ù×iÒg ×ÓÐeÐÝ Øhe C¹AÈÁ ØhaÒ cÓÒ×ØÖaiÒØ× fÓÖ Øhe ÔÖÓgÖaÑÑeÖº EÜaÑÔÐe× Óf Ìcк XÇÌcÐ i× a ×ØaÒdaÖd ÌcÐ eÜØeÒ×iÓÒ Ûhich aÖe Øhe ×ÙÔÔ ÓÖØ Óf dÝÒaÑic chaÒge× aÒd iÒØÖÓ×Ô ec¹ caÒ b e dÝÒaÑicaÐÐÝ ÐÓaded iÒØÓ eÚeÖÝ ÌcÐ cÓÑÔÐiaÒØ ØiÓÒ ÑechaÒi×Ñ× ÛheÖeÚeÖ Ô Ó××ibÐeº Ìhi× de×igÒ eÒÚiÖÓÒÑeÒØ ´×Ùcha×ØcÐ×h¸ Ûi×h ÓÖ Ïafe [¾¿]µº ÔhiÐÓ×ÓÔhÝ ØÖade× iÒ eÜÔÖe××iÚeÒe×× fÓÖ ÔÖÓØecØiÓÒ iÒ ÓÖdeÖ ØÓ ea×e ÔÖÓgÖaÑÑiÒgº ÀÓÛeÚeÖ¸ a highÐÝ A ceÒØÖaÐ ÔÖÓÔ eÖØÝ Óf ×cÖiÔØiÒg ÐaÒgÙage× i× Øhe Ù×e Óf ­eÜibÐe ÐaÒgÙage de×igÒ iÑÔÐie× Ðe×× haÖd¹ÛiÖed ÔÖÓ¹ ×ØÖiÒg× a× Øhe ÓÒÐÝ ÖeÔÖe×eÒØaØiÓÒ Óf daØaº FÓÖ ØhaØ ØecØiÓÒ agaiÒ×Ø bad ×ÓfØÛaÖe aÖchiØecØÙÖe× ÓÖ bad Öea×ÓÒ a ×cÖiÔØiÒg ÐaÒgÙage Ó«eÖ× a dÝÒaÑic ØÝÔ e ÔÖÓgÖaÑÑiÒg ×ØÝÐeº Ïe b eÐieÚe ØhaØ ÒÓ ÔÖÓØecØiÓÒ ÇÌcÐ ´di×cÙ××ed iÒ ËecØiÓÒ ¾ aÒd iÒ [¿¿]µº ËiÒce ÑechaÒi×Ñ× caÒ eÒfÓÖce Øhe geÒeÖaØiÓÒ Óf cÓheÖeÒØ ÏeØheÖaÐÐ aÒd ÄiÒdbÐad ÔÖÓÚide iÒ [¿¾] a deØaiÐed ÔÖe¹ cÓ de»de×igÒ׸ ×Ó Ûe fÓ cÙ×ed ÓÒ eÜÔÖe××iÚeÒe×× bÝ ×eÒØaØiÓÒ Óf ÇÌcÐ aÒd iØ× de×igÒ cÓÒ×ideÖaØiÓÒ׸ Ûe ÔÖÓÚidiÒg Øhe ÔÖÓgÖaÑÑeÖ ÛiØh ÑÓÖe Ô ÓÛeÖfÙÐ cÓÒ¹ fÓ cÙ× heÖe ÓÒ Øhe di«eÖeÒce× ØÓ XÇÌcк Ìhe ÐaØeÖ ×ØÖÙcØ× ÖaØheÖ ØhaÒ ÓÒ ÑakiÒg deci×iÓÒ× iÒ heÖ»hi× ×ecØiÓÒ× iÒØÖÓ dÙce Øhe ÒeÛ ÐaÒgÙage cÓÒ×ØÖÙcØ× Óf ÔÐaceº XÇÌcÐ aÒd di×cÙ×× ØheiÖ Ù×ageº FiÒaÐÐÝ Ûe ÔÖe×eÒØ a ÔaÖØ Óf a ÐaÖgeÖ aÔÔÐicaØiÓÒ eÜaÑÔÐe ´aÒ XÅĹ ØeÖÔÖeØeÖµ ba×ed ÓÒ de×igÒ ÔaØØeÖÒ׸ Ûhich Tcl ÔaÖ×eÖ»¹iÒ Øed Ù×iÒg Øhe ÒeÛ ÐaÒgÙage cÓÒ×ØÖÙcØ׺ namespaces Tcl i× iÑÔÐeÑeÒ introspection extensibility ÄaÒgÙage CÓÒ×ØÖÙcØ× DeÖiÚed fÖÓÑ XOTcl ... ¾ Çb jecØ ÌcÐ ´ÇÌcе New Functionalities: Adopted from OTcl: Other ÅÁÌ dynamic aggregations object-orientation: Extensions nested classes Tcl encapsulation assertions inheritance ÇbjecØ cÓÑÑaÒd i× Ù×ed ØÓ cÖeaØe ÒeÛ Ób jecØ׺ meta-data Ìhe per-object mixins multiple inheritance ÔÖÓÚide× acce×× ØÓ Øhe ÇbjecØ cÐa×× Ûhich hÓÐd× filter method chaining ÁØ meta-classes cÓÑÑÓÒ feaØÙÖe× Óf aÐÐ Ób jecØ׺ Çb jecØ× aÖe aй read/write introspection Øhe dynamic extensibility ÛaÝ× iÒ×ØaÒce× Óf cÐa××e׸ bÙØ ×iÒce Ób jecØ× fÖÓÑ Øhe ÑÓ×Ø geÒeÖaÐ cÐa×× ÇbjecØ haÚe ÒÓ Ù×eÖ¹de¬Òed ØÝÔ e¸ ØheÝ ÑaÝ be ÖefeÖÖed ØÓ a× ×iÒgÙÐaÖ ÓbjecØ׺ EÚeÖÝ FigÙÖe ½: ÄaÒgÙage EÜØeÒ×iÓÒ× Óf XÇÌcÐ Ób jecØ caÒ b e dÝÒaÑicaÐÐÝ Öe¬Òed ÛiØh ÚaÖiabÐe× aÒd ÛiØh Ób jecع×Ô eci¬c ÑeØhÓ d× ´Ù×iÒg Øhe ÔÖÓc iÒ×ØaÒce Ìhe ÔÖÓÔ eÖØie× Óf ÇÌcÐ de×cÖib ed ab ÓÚe ÔÖÓÚide ÑeØhÓ dµ aØ ÖÙÒ¹ØiÑeº ÁÒ Øhe b Ó dÝ Óf a ÔÖÓ c¸ Øhe ÔÖe¹ a gÓÓd ba×i× fÓÖ ÓÙÖ ÛÓÖk ´×ee FigÙÖe ½µº ÁÒ Øhe de¬Òed cÓÑÑaÒd ×eÐf i× Ù×ed ØÓ deØeÖÑiÒe Øhe ÒaÑe ÐaÒgÙage de×igÒ Óf XÇÌcÐ Ûe fÓ cÙ× ÓÒ ÑechaÒi×Ñ× Óf Øhe cÙÖÖeÒØ Ób jecغ ×eÐf caÒ b e Ù×ed ØÓ ÓbØaiÒ Øhe ØÓ ÑaÒage Øhe cÓÑÔÐeÜiØÝ iÒ ÐaÖge Ób jecعÓÖieÒØed fÓÐÐÓÛiÒg iÒfÓÖÑaØiÓÒ ab ÓÙØ Øhe cÙÖÖeÒØiÒÚÓ caØiÓÒ: ×Ý×ØeÑ׸ e×Ô eciaÐÐÝ ÛheÒ Øhe×e ×Ý×ØeÑ× haÚe ØÓ be adaÔØed fÓÖ ceÖØaiÒ ÔÙÖÔ Ó×e׺ ËÙch ×iØÙaØiÓÒ× Ó ccÙÖ ¯ ×eÐf ´ÛiØhÓÙØ ÔaÖaÑeØeÖ×µ ÖeØÙÖÒ× Øhe ÒaÑe Óf fÖeÕÙeÒØÐÝ iÒ Øhe cÓÒØeÜØ Óf ×cÖiÔØiÒg ÐaÒgÙage׺ ÁÒ Øhe cÙÖÖeÒØÐÝ eÜecÙØiÒg Ób jecغ ÔaÖØicÙÐaÖ Ûe added Øhe fÓÐÐÓÛiÒg ×ÙÔÔ ÓÖØ: ¯ ×eÐf cÐa×× ÖeØÙÖÒ× Øhe ÒaÑe Óf Øhe cÐa×׸ Ûhich ¯ FiÐØeÖ× a× a ÑeaÒ× Óf ab×ØÖacØiÓÒ× ÓÚeÖ ÑeØhÓ d hÓÐd× Øhe cÙÖÖeÒØÐÝ eÜecÙØiÒg ÑeØhÓ dº ÆÓØe¸ iÒÚÓ caØiÓÒ× ØÓ iÑÔÐeÑeÒØ ÐaÖge ×ØÖÙcØÙÖe׸ Ðike ØhaØ iØ ÑaÝ di«eÖ fÖÓÑ Øhe Ób jecØ³× cÐa×׺ de×igÒ ÔaØØeÖÒ׸ aÒd ØÓ ØÖace»adaÔØ Ñe××age׺ ¯ ×eÐf ÔÖÓc ÖeØÙÖÒ× Øhe ÒaÑe Óf Øhe cÙÖÖeÒØÐÝ eܹ ¯ ÈeÖ¹ÓbjecØ ÑiÜiÒ׸ a× a ÑeaÒ× ØÓ giÚe aÒ Ób jecØ ecÙØiÒg ÑeØhÓ dº acce×× ØÓ ×eÚeÖaÐ di«eÖeÒØ ×ÙÔÔÐeÑeÒØaÐ cÐa××e׺ A ÖeadeÖ ÛiØh ÇÌcÐ kÒÓÛÐedge ÛiÐÐ ÒÓØe¸ ØhaØ ØheÖe ¯ DÝÒaÑic ÇbjecØ AggÖegaØiÓÒ׸ ØÓ ÔÖÓÚide dݹ i× a di«eÖeÒce ØÓ Øhe ÖeaÐiÞaØiÓÒ Óf Øhe×e Ób jecØ iÒfÓÖ¹ ÒaÑic aggÖegaØiÓÒ× ØhÖÓÙgh Òe×Øed ÒaÑe×¹ ÑaØiÓÒ× ØÓ ÇÌcк XÇÌcÐ Ù×e× cÓÑÑaÒd× ØÓ ÓbØaiÒ Ôace׺ Øhi× iÒfÓÖÑaØiÓÒ¸ ÛheÖea× ÇÌcÐ Ù×e× ØhÖee iÑÔÐiciØ ÚaÖiabÐe× fÓÖ Øhi× ÔÙÖÔ Ó×e ´×eÐf¸ cÐa×׸ aÒd ÔÖÓcµº ¯ Æe×Øed CÐa××e׸ ØÓ ÖedÙce Øhe iÒØeÖfeÖeÒce Óf Ìhi× chaÒge Ñake× Øhe iÒØeÖÒaÐ caÐÐiÒg cÓÒÚeÒØiÓÒ× iÒdeÔ eÒdeÒØÐÝ deÚeÐÓÔ ed ÔÖÓgÖaÑ ×ØÖÙcØÙÖe׺ Óf XÇÌcÐ ÑeØhÓ d× cÓÑÔaØibÐe ÛiØh ÌcÐ ÔÖÓ cedÙÖe׺ ¯ A××eÖØiÓÒ׸ ØÓ ÖedÙce Øhe iÒØeÖface aÒd Øhe Öe¹ Ìhi× ha× Øhe adÚaÒØage ØhaØ Øhe ÑeØhÓ d× aÖe acce×¹ ÐiabiÐiØÝ ÔÖÓbÐeÑ× caÙ×ed bÝ dÝÒaÑic ØÝÔiÒgº ×ibÐe iÒ XÇÌcÐ Úia ÒaÑe×Ôace¹ÔaØh× ´×ee ËecØiÓÒ 5µº FÓÖ cÓÑÔaØibiÐiØÝ XÇÌcÐ ÔÖÓÚide× Øhe cÓÑÔiÐaØiÓÒ ¯ ÅeØa¹daØa¸ ØÓ eÒhaÒce ×eÐf¹dÓ cÙÑeÒØaØiÓÒº ÓÔØiÓÒ AÍÌÇÎAÊË ØÓ ×eØ Øhe×e ÚaÖiabÐe× aÙØÓÑaØicaÐÐÝ ´ÛiØh a ×ÐighØ Ô eÖfÓÖÑaÒce di×adÚaÒØageµº ÁÒ Øhi× ÔaÔ eÖ Ûe de×cÖib e Øhe×e× fÙÒcØiÓÒaÐiØie× fÖÓÑ a ÐaÒgÙage Ô ÓiÒØ Óf ÚieÛº Ìhe iÑÔÐeÑeÒØed eÜØeÒ¹ EÚeÖÝ Ób jecØ i× a××Ó ciaØed ÛiØh a cÐa×× ÓÚeÖ Øhe cÐa×× ×iÓÒ× ÔÖÓÚide addiØiÓÒaÐ fÙÒcØiÓÒaÐiØÝ aÒd Ðead ØÓ aÒ ÖeÐaØiÓÒ×hiÔº CÐa××e× aÖe ×Ô eciaÐ Ób jecØ× ÛiØh Øhe ÔÙÖ¹ iÑÔÖÓÚed Ô eÖfÓÖÑaÒce iÒ cÓÑÔaÖi×ÓÒ ØÓ ÇÌcк ÀÓÛ¹ Ô Ó×e Óf ÑaÒagiÒg ÓØheÖ Ób jecØ׺ \ÅaÒagiÒg" ÑeaÒ× eÚeÖ¸ Ûe had ØÓ iÒØÖÓ dÙce a feÛ iÒcÓÑÔaØibiÐiØie× ØÓ ØhaØ a cÐa×× cÓÒØÖÓÐ× Øhe cÖeaØiÓÒ aÒd de×ØÖÙcØiÓÒ Óf iØ× iÒ×ØaÒce× aÒd ØhaØ iØ cÓÒØaiÒ× a ÖeÔ Ó×iØÓÖÝ Óf cÐa××»×ÙÔ eÖcÐa×× ÖeÐaØiÓÒ×hiÔ׺ AØaÒÝ ØiÑe Øhe cÐa×× ÑeØhÓ d× ´\iÒ×ØÔÖÓ c×"µ acce××ibÐe fÓÖ Øhe iÒ×ØaÒce׺ gÖaÔh ÑaÝbechaÒged eÒØiÖeÐÝ Ù×iÒg Øhe ×ÙÔeÖcÐa×× ÑeØhÓ d¸ ÓÖ aÒ Ób jecØ ÑaÝ chaÒge iØ× cÐa×× ØhÖÓÙgh Ìhe iÒ×ØaÒce ÑeØhÓ d× cÓÑÑÓÒ ØÓ aÐÐ Ób jecØ× aÖe de¹ Øhe cÐa×× ÑeØhÓ dº Ìhi× feaØÙÖe caÒ be Ù×ed fÓÖ ¬Òed iÒ Øhe ÖÓ ÓØ cÐa×× ÇbjecØ ´ÔÖede¬Òed ÓÖ Ù×eÖ¹ aÒ iÑÔÐeÑeÒØaØiÓÒ Óf a Ðife¹cÝcÐe ÓÖ ÓØheÖ iÒØÖiÒ×ic de¬Òedµº ËiÒce a cÐa×× i× a ×Ô eciaÐ ´ÑaÒagiÒgµ kiÒd chaÒge× [¾¼] Óf Ób jecØ ÔÖÓÔ eÖØie× ´iÒ cÓÒØÖa×Ø ØÓ eܹ Óf Ób jecØ iØ i× ÑaÒaged iØ×eÐf bÝ a ×Ô eciaÐ cÐa×× caÐÐed ØÖiÒ×ic ÔÖÓÔ eÖØie× eºgº ÑÓ deÐed ØhÖÓÙgh ÖÓÐe× [½4¸¾¼] \ÑeØa¹cÐa××" ´Ûhich ÑaÒage× iØ×eÐf µº ÇÒe iÒØeÖe×ع aÒd iÑÔÐeÑeÒØed ØhÖÓÙgh Ô eÖ¹Ób jecØ ÑiÜiÒ× [¾4]µ º iÒg a×Ô ecØ Óf
Recommended publications
  • 032133633X Sample.Pdf
    Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals. Excerpts from the Tcl/Tk reference documentation are used under the terms of the Tcl/Tk license (http://www.tcl.tk/software/tcltk/license.html). The open source icon set used in Figures 22-1, 22-2, and 22-3 are from the Tango Desktop Project (http://tango.freedesktop.org/Tango_Desktop_Project). The authors and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein. The publisher offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales, which may include electronic versions and/or custom covers and content particular to your business, training goals, marketing focus, and branding interests. For more information, please contact: U.S. Corporate and Government Sales (800) 382-3419 [email protected] For sales outside the United States please contact: International Sales [email protected] Visit us on the Web: informit.com/aw Library of Congress Cataloging-in-Publication Data Ousterhout, John K. Tcl and the Tk toolkit / John Ousterhout, Ken Jones ; with contributions by Eric Foster-Johnson . [et al.]. — 2nd ed.
    [Show full text]
  • Xotcl - Tutorial 1.6.4
    XOTcl - Tutorial 1.6.4 Gustaf Neumann and Uwe Zdun XOTcl - Tutorial 1 XOTcl - Tutorial XOTcl - Tutorial - Index Version: 1.6.4 • Introduction ♦ Language Overview ♦ Introductory Overview Example: Stack ◊ Object specific methods ◊ Refining the behavior of objects and classes ◊ Stack of integers ◊ Class specifc methods ♦ Introductory Overview Example: Soccer Club • Object and Class System • Basic Functionalities ♦ Objects ◊ Data on Objects ◊ Methods for Objects ◊ Information about Objects ♦ Classes ◊ Creating Classes and Deriving Instances ◊ Methods Defined in Classes ◊ Information about Classes ◊ Inheritance ◊ Destruction of Classes ◊ Method Chaining ♦ Dynamic Class and Superclass Relationships ♦ Meta-Classes ♦ Create, Destroy, and Recreate Methods ♦ Methods with Non-Positional Arguments • Message Interception Techniques ♦ Filter ♦ Mixin Classes ♦ Precedence Order ♦ Guards for Filters and Mixins ♦ Querying, Setting, Altering Filter and Mixin Lists ♦ Querying Call-stack Information • Slots ♦ System Slots ♦ Attribute Slots ♦ Setter and Getter Methods for Slots ♦ Backward-compatible Short-Hand Notation for Attribute Slots ♦ Experimental Slot Features ◊ Value Checking ◊ Init Commands and Value Commands for Slot Values • Nested Classes and Dynamic Object Aggregations ♦ Nested Classes 2 XOTcl - Tutorial ♦ Dynamic Object Aggregations ♦ Relationship between Class Nesting and Object Aggregation ♦ Simplified Syntax for Creating Nested Object Structures ♦ Copy/Move • Method Forwarding • Assertions • Additional Functionalities ♦ Abstract Classes ♦ Automatic Name Creation ♦ Meta-Data • Integrating XOTcl Programs with C Extensions (such as Tk) • References 3 XOTcl - Tutorial Introduction Language Overview XOTcl [Neumann and Zdun 2000a] is an extension to the object-oriented scripting language OTcl [Wetherall and Lindblad 1995] which itself extends Tcl [Ousterhout 1990] (Tool Command Language) with object-orientation. XOTcl is a value-added replacement for OTcl and does not require OTcl to compile.
    [Show full text]
  • Xotcl − Documentation −− ./Doc/Langref.Xotcl ./Doc/Langref.Xotcl
    XOTcl − Documentation −− ./doc/langRef.xotcl ./doc/langRef.xotcl Package/File Information No package provided/required Defined Objects/Classes: • Class: __unknown, allinstances, alloc, create, info, instdestroy, instfilter, instfilterguard, instforward, instinvar, instmixin, instparametercmd, instproc, new, parameter, parameterclass, recreate, superclass, unknown, volatile. • Object: abstract, append, array, autoname, check, class, cleanup, configure, copy, destroy, eval, exists, extractConfigureArg, filter, filterguard, filtersearch, forward, getExitHandler, hasclass, incr, info, instvar, invar, isclass, ismetaclass, ismixin, isobject, istype, lappend, mixin, move, noinit, parametercmd, proc, procsearch, requireNamespace, set, setExitHandler, trace, unset, uplevel, upvar, vwait. Filename: ./doc/langRef.xotcl Description: XOTcl language reference. Describes predefined objects and classes. Predefined XOTcl contains three predefined primitives: primitives: self computes callstack related information. It can be used in the following ways: • self − returns the name of the object, which is currently in execution. If it is called from outside of a proc, it returns the error message ``Can't find self''. • self class − the self command with a given argument class returns the name of the class, which holds the currently executing instproc. Note, that this may be different to the class of the current object. If it is called from a proc it returns an empty string. • self proc − the self command with a given argument proc returns the name of the currently executing proc or instproc. • self callingclass: Returns class name of the class that has called the executing method. • self callingobject: Returns object name of the object that has called the executing method. • self callingproc: Returns proc name of the method that has called the executing method. • self calledclass: Returns class name of the class that holds the target proc (in mixins and filters).
    [Show full text]
  • Tcloo: Past, Present and Future Donal Fellows University of Manchester / Tcl Core Team [email protected]
    TclOO: Past, Present and Future Donal Fellows University of Manchester / Tcl Core Team [email protected] to being universally deployed in Tcl Abstract installations to date, and the way in This paper looks at the state of Tcl’s new which you declare classes within it is object system, TclOO, looking at the forces that exceptionally easy to use. On the other lead to its development and the development hand, it shows its heritage in the C++ process itself. The paper then focuses on the model of the early 1990s, being rela- current status of TclOO, especially its interest- tively inflexible and unable to support ing features that make it well-suited to being a many advanced features of object sys- foundational Tcl object system, followed by a tems. look at its actual performance and some of the XOTcl: In many ways, XOTcl represents the uses to which it has already been put. Finally, polar opposite of itcl. It has a great set the paper looks ahead to some of the areas of basic semantic features and is enor- where work may well be focused in the future. mously flexible, both features that fit the spirit of the Tcl language itself very 1. TclOO: Past well, but it is awkward syntactically and has a strong insistence on adding a Genesis (with Phil Collins) lot of methods that are not needed everywhere, making the interface ex- One of the longest-standing complaints about Tcl posed by objects cluttered. has been its lack of an object system; this has not always been an entirely fair criticism, as Tcl has in Snit: Snit is the most interesting of the fact had rather too many of them! The most well purely scripted object systems (the known ones are Tk (in a sense), [incr Tcl], XOTcl others all have substantial C compo- and Snit.
    [Show full text]
  • Scenario-Based Component Testing Using Embedded Metadata
    Scenario-based Component Testing Using Embedded Metadata Mark Strembeck and Uwe Zdun Department of Information Systems - New Media Lab, Vienna University of Economics and BA, Austria fmark.strembeck|[email protected] Abstract We present an approach for the use case and scenario-based testing of software components. Use cases and scenarios are applied to describe the functional requirements of a software system. In our approach, a test is defined as a formalized and executable description of a scenario. Tests are derived from use case scenarios via continuous re- finement. The use case and test information can be associated with a software component as embedded component metadata. In particular, our approach provides a model-based mapping of use cases and scenarios to test cases, as well as (runtime) traceability of these links. Moreover, we describe an implementation-level test framework that can be integrated with many different programming languages. 1 Introduction Testing whether a software product correctly fulfills the customer requirements and detecting problems and/or errors is crucial for the success of each software product. Testing, however, causes a huge amount of the total software development costs (see for instance [16,24]). Stud- ies indicate that fifty percent or more of the total software development costs are devoted to testing [12]. As it is almost impossible to completely test a complex software system, one needs an effective means to select relevant test cases, express and maintain them, and automate tests whenever possible. The goal of a thorough testing approach is to significantly reduce the development time and time-to-market and to ease testing after change activities, regardless whether a change occurs on the requirements, design, or test level.
    [Show full text]
  • Langref-Xotcl.Pdf
    XOTcl − Documentation −− ./doc/langRef.xotcl ./doc/langRef.xotcl Package/File Information No package provided/required Defined Objects/Classes: • ::xotcl::Slot: • Attribute: • Class: __unknown, allinstances, alloc, create, info, instdestroy, instfilter, instfilterguard, instforward, instinvar, instmixin, instparametercmd, instproc, new, parameter, parameterclass, recreate, superclass, unknown. • Object: abstract, append, array, autoname, check, class, cleanup, configure, contains, copy, destroy, eval, exists, extractConfigureArg, filter, filterguard, filtersearch, forward, getExitHandler, hasclass, incr, info, instvar, invar, isclass, ismetaclass, ismixin, isobject, istype, lappend, mixin, move, noinit, parametercmd, proc, procsearch, requireNamespace, set, setExitHandler, subst, trace, unset, uplevel, upvar, volatile, vwait. Filename: ./doc/langRef.xotcl Description: XOTcl language reference. Describes predefined objects and classes. Predefined XOTcl contains the following predefined primitives (Tcl commands): primitives: self computes callstack related information. It can be used in the following ways: ◊ self − returns the name of the object, which is currently in execution. If it is called from outside of a proc, it returns the error message ``Can't find self''. ◊ self class − the self command with a given argument class returns the name of the class, which holds the currently executing instproc. Note, that this may be different to the class of the current object. If it is called from a proc it returns an empty string. ◊ self proc − the self command with a given argument proc returns the name of the currently executing proc or instproc. ◊ self callingclass: Returns class name of the class that has called the executing method. ◊ self callingobject: Returns object name of the object that has called the executing method. ◊ self callingproc: Returns proc name of the method that has called the executing method.
    [Show full text]
  • You Say 'JML' ? Wikipedia (En)
    You say 'JML' ? Wikipedia (en) PDF generated using the open source mwlib toolkit. See http://code.pediapress.com/ for more information. PDF generated at: Mon, 06 Jan 2014 09:58:42 UTC Contents Articles Java Modeling Language 1 Design by contract 5 Formal methods 10 References Article Sources and Contributors 15 Image Sources, Licenses and Contributors 16 Article Licenses License 17 Java Modeling Language 1 Java Modeling Language The Java Modeling Language (JML) is a specification language for Java programs, using Hoare style pre- and postconditions and invariants, that follows the design by contract paradigm. Specifications are written as Java annotation comments to the source files, which hence can be compiled with any Java compiler. Various verification tools, such as a runtime assertion checker and the Extended Static Checker (ESC/Java) aid development. Overview JML is a behavioural interface specification language for Java modules. JML provides semantics to formally describe the behavior of a Java module, preventing ambiguity with regard to the module designers' intentions. JML inherits ideas from Eiffel, Larch and the Refinement Calculus, with the goal of providing rigorous formal semantics while still being accessible to any Java programmer. Various tools are available that make use of JML's behavioral specifications. Because specifications can be written as annotations in Java program files, or stored in separate specification files, Java modules with JML specifications can be compiled unchanged with any Java compiler. Syntax JML specifications are added to Java code in the form of annotations in comments. Java comments are interpreted as JML annotations when they begin with an @ sign.
    [Show full text]
  • Pipenightdreams Osgcal-Doc Mumudvb Mpg123-Alsa Tbb
    pipenightdreams osgcal-doc mumudvb mpg123-alsa tbb-examples libgammu4-dbg gcc-4.1-doc snort-rules-default davical cutmp3 libevolution5.0-cil aspell-am python-gobject-doc openoffice.org-l10n-mn libc6-xen xserver-xorg trophy-data t38modem pioneers-console libnb-platform10-java libgtkglext1-ruby libboost-wave1.39-dev drgenius bfbtester libchromexvmcpro1 isdnutils-xtools ubuntuone-client openoffice.org2-math openoffice.org-l10n-lt lsb-cxx-ia32 kdeartwork-emoticons-kde4 wmpuzzle trafshow python-plplot lx-gdb link-monitor-applet libscm-dev liblog-agent-logger-perl libccrtp-doc libclass-throwable-perl kde-i18n-csb jack-jconv hamradio-menus coinor-libvol-doc msx-emulator bitbake nabi language-pack-gnome-zh libpaperg popularity-contest xracer-tools xfont-nexus opendrim-lmp-baseserver libvorbisfile-ruby liblinebreak-doc libgfcui-2.0-0c2a-dbg libblacs-mpi-dev dict-freedict-spa-eng blender-ogrexml aspell-da x11-apps openoffice.org-l10n-lv openoffice.org-l10n-nl pnmtopng libodbcinstq1 libhsqldb-java-doc libmono-addins-gui0.2-cil sg3-utils linux-backports-modules-alsa-2.6.31-19-generic yorick-yeti-gsl python-pymssql plasma-widget-cpuload mcpp gpsim-lcd cl-csv libhtml-clean-perl asterisk-dbg apt-dater-dbg libgnome-mag1-dev language-pack-gnome-yo python-crypto svn-autoreleasedeb sugar-terminal-activity mii-diag maria-doc libplexus-component-api-java-doc libhugs-hgl-bundled libchipcard-libgwenhywfar47-plugins libghc6-random-dev freefem3d ezmlm cakephp-scripts aspell-ar ara-byte not+sparc openoffice.org-l10n-nn linux-backports-modules-karmic-generic-pae
    [Show full text]
  • Xotcl − Documentation −− ./Doc/Langref.Xotcl ./Doc/Langref.Xotcl
    XOTcl − Documentation −− ./doc/langRef.xotcl ./doc/langRef.xotcl Package/File Information Package provided: XOTcl−langRef 1.3.3 Package required: Tcl Defined Objects/Classes: • Class: __unknown, alloc, create, info, instdestroy, instfilter, instfilterguard, instforward, instinvar, instmixin, instparametercmd, instproc, new, parameter, parameterclass, recreate, superclass, unknown, volatile. • Object: abstract, append, array, autoname, check, class, cleanup, configure, copy, destroy, eval, exists, extractConfigureArg, filter, filterguard, filtersearch, forward, getExitHandler, hasclass, incr, info, instvar, invar, isclass, ismetaclass, ismixin, isobject, istype, lappend, mixin, move, noinit, parametercmd, proc, procsearch, requireNamespace, set, setExitHandler, trace, unset, uplevel, upvar, vwait. Filename: ./doc/langRef.xotcl Description: XOTcl language reference. Describes predefined objects and classes. Predefined primitives: XOTcl contains three predefined primitives: self computes callstack related information. It can be used in the following ways: • self − returns the name of the object, which is currently in execution. If it is called from outside of a proc, it returns the error message ``Can't find self''. • self class − the self command with a given argument class returns the name of the class, which holds the currently executing instproc. Note, that this may be different to the class of the current object. If it is called from a proc it returns an empty string. • self proc − the self command with a given argument proc returns the name of the currently executing proc or instproc. • self callingclass: Returns class name of the class that has called the executing method. • self callingobject: Returns object name of the object that has called the executing method. • self callingproc: Returns proc name of the method that has called the executing method.
    [Show full text]
  • 2003 European Tcl/Tk User Meeting
    THE MAGAZINE OF USENIX & SAGE August 2003 • volume 28 • number 4 inside: CONFERENCE REPORTS 2003 European Tcl/Tk User Meeting & The Advanced Computing Systems Association & The System Administrators Guild 2003 European Tcl/Tk User Witt described Infopark’s content man- well adapted to fill-out-a-form style Meeting agement system, NPS, and why and how applications. This makes it easy to auto- they decided to use Tcl as the applica- matically create a “Poor Man’s GUI” NÜRNBERG, GERMANY tion scripting language. from a description of the data in a form. MAY 30 AND 31, 2003 Summarized by Clif Flynt The NPS package is written in Objective He also demonstrated an application of C. They extend the application’s func- Knuth’s “Literate Programming” para- THE STATE OF TCL tionality by embedding the Tcl inter- digm by mixing text and code in the text Andreas Kupries, ActiveState preter because: widget. His example uses the text wid- get’s bind command to trigger actions Kupries described the status of the cur- I Tcl is open source, using the BSD based on the text being inserted into the rent Tcl release as well as ActiveState’s license, and so is free for commer- widget. current offerings. He reported that the cial use. use of Tcl (based on downloads) is still I The same Tcl code runs on all plat- ORASTATE (ORACLE STRUCTURE TOOL growing, with several major manufac- forms. AND TABLE EDITOR) turers joining the Tcl ranks. I Tcl is a normal glue language, with Martin Fickert The 8.4 series is now officially closed to no surprises for the casual pro- ORASTATE is an application that gener- new features, though still open for grammer.
    [Show full text]
  • Scenario-Based Component Testing Using Embedded Metadata
    Scenario-based Component Testing Using Embedded Metadata Mark Strembeck and Uwe Zdun Department of Information Systems - New Media Lab, Vienna University of Economics and BA, Austria {mark.strembeck|uwe.zdun}@wu-wien.ac.at Abstract We present an approach for the use case and scenario-based testing of software components. Use cases and scenarios are applied to describe the functional requirements of a software system. In our approach, a test is defined as a formalized and executable description of a scenario. Tests are derived from use case scenarios via continuous re- finement. The use case and test information can be associated with a software component as embedded component metadata. In particular, our approach provides a model-based mapping of use cases and scenarios to test cases, as well as (runtime) traceability of these links. Moreover, we describe an implementation-level test framework that can be integrated with many different programming languages. 1 Introduction Testing whether a software product correctly fulfills the customer requirements and detecting problems and/or errors is crucial for the success of each software product. Testing, however, causes a huge amount of the total software development costs (see for instance [16,24]). Stud- ies indicate that fifty percent or more of the total software development costs are devoted to testing [12]. As it is almost impossible to completely test a complex software system, one needs an effective means to select relevant test cases, express and maintain them, and automate tests whenever possible. The goal of a thorough testing approach is to significantly reduce the development time and time-to-market and to ease testing after change activities, regardless whether a change occurs on the requirements, design, or test level.
    [Show full text]
  • Xotclide User Guide
    XOTclIDE User Guide Artur Trzewik Edited by Bill Paulson XOTclIDE User Guide by Artur Trzewik and Bill Paulson Copyright © 2006 Artur Trzewik This document contains the user documentation and tutorials for XOTclIDE XOTclIDE is an Integrated Development Environment for XOTcl and Tcl. XOTcl is an object oriented extension for Tcl. XOTcl can also manage old Tcl code (procs). XOTclIDE was suggested and inspired by such great Smalltalk graphical environment systems as Squeak and Envy. XOTclIDE is licensed under the GNU Public License Copyright Artur Trzewik. License GNU Free Documentation License (GFDL) Table of Contents 1. XOTclIDE Overview ................................................................................................ 1 About this document ............................................................................................ 1 Main Features .....................................................................................................1 Benefits .............................................................................................................1 Ancestry ............................................................................................................2 2. Getting Started Tutorial ............................................................................................ 4 Developing Your First Application - Tutorial ........................................................... 4 Starting XOTclIDE ..................................................................................... 4 Creating new
    [Show full text]