Reasoning with probabilistic models is a widespread and successful technique in areas ranging from computer vision, to natural language processing, to bioinformatics. Currently, these reasoning systems are either coded from scratch in general-purpose languages or use formalisms such as Bayesian networks that have limited expressive power. In both cases, the resulting systems are difficult to modify, maintain, compose, and interoperate with. This work presents Probabilistic Scheme, an embedding of probabilistic computation into Scheme. This gives programmers an expressive language for implementing modular probabilistic models that integrate naturally with the rest of Scheme.
{"title":"Report on the probabilistic language scheme","authors":"Alexey Radul","doi":"10.1145/1297081.1297085","DOIUrl":"https://doi.org/10.1145/1297081.1297085","url":null,"abstract":"Reasoning with probabilistic models is a widespread and successful technique in areas ranging from computer vision, to natural language processing, to bioinformatics. Currently, these reasoning systems are either coded from scratch in general-purpose languages or use formalisms such as Bayesian networks that have limited expressive power. In both cases, the resulting systems are difficult to modify, maintain, compose, and interoperate with. This work presents Probabilistic Scheme, an embedding of probabilistic computation into Scheme. This gives programmers an expressive language for implementing modular probabilistic models that integrate naturally with the rest of Scheme.","PeriodicalId":344101,"journal":{"name":"Dynamic Languages Symposium","volume":"48 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2007-10-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"130537110","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Object aliasing causes as many problems in dynamic languages as it does in static languages. Most existing work on aliasing, such as ownership types, relies on static checking based on annotations and type declarations. We introduce ConstraintedJava, a scripting language based on BeanShell that provides dynamic ownership checking. Dynamic ownership provides the encapsulation benefits of static ownership types but preserves the flexibility of dynamic languages.
{"title":"Dynamic ownership in a dynamic language","authors":"Donald Gordon, J. Noble","doi":"10.1145/1297081.1297090","DOIUrl":"https://doi.org/10.1145/1297081.1297090","url":null,"abstract":"Object aliasing causes as many problems in dynamic languages as it does in static languages. Most existing work on aliasing, such as ownership types, relies on static checking based on annotations and type declarations. We introduce ConstraintedJava, a scripting language based on BeanShell that provides dynamic ownership checking. Dynamic ownership provides the encapsulation benefits of static ownership types but preserves the flexibility of dynamic languages.","PeriodicalId":344101,"journal":{"name":"Dynamic Languages Symposium","volume":"37 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2007-10-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"127569962","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
This paper discusses key design decisions faced by a language design team while adding Object Oriented language features to Dyalog, a modern dialect of APL. Although classes and interfaces are first-class language elements in the new language, and arrays can both contain and be contained by objects, arrays are not objects. The use of object oriented features is optional, and users can elect to remain entirely in the functional and array paradigms of traditional APL. The choice of arrays as a "higher" level of organization allows APL's elegant notation for array manipulation to extend smoothly to arrays of objects.
{"title":"Arrays of objects","authors":"Morten Kromberg","doi":"10.1145/1297081.1297087","DOIUrl":"https://doi.org/10.1145/1297081.1297087","url":null,"abstract":"This paper discusses key design decisions faced by a language design team while adding Object Oriented language features to Dyalog, a modern dialect of APL. Although classes and interfaces are first-class language elements in the new language, and arrays can both contain and be contained by objects, arrays are not objects. The use of object oriented features is optional, and users can elect to remain entirely in the functional and array paradigms of traditional APL. The choice of arrays as a \"higher\" level of organization allows APL's elegant notation for array manipulation to extend smoothly to arrays of objects.","PeriodicalId":344101,"journal":{"name":"Dynamic Languages Symposium","volume":"38 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2007-10-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"117226725","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
From the beginning, Microsoft's .NET framework was designed to support a broad range of different programming languages on a Common Language Runtime (CLR). The CLR provides shared services to these languages ranging from a world-class GC and JIT to a sandboxed security model to tools integration for debugging and profiling. Sharing these features has two huge benefits for languages on the CLR. First, it's easier to implement a language because lots of difficult engineering work is already done for you. Second, and more importantly, these languages can seamlessly work together and share libraries and frameworks so that each language can build on the work of the others. The CLR has good support for dynamic languages today. IronPython-1.0 demonstrates this. The new Dynamic Language Runtime (DLR) adds a small set of key features to the CLR to make it dramatically better. It adds to the platform a set of services designed explicitly for the needs of dynamic languages. These include a shared dynamic type system, standard hosting model and support to make it easy to generate fast dynamic code. With these additional features it becomes dramatically easier to build high-quality dynamic language implementations on .NET. More importantly, these features enable all of the dynamic languages which use the DLR to freely share code with other dynamic languages as well as with the existing powerful static languages on the platform such as VB.NET and C#.
从一开始,微软的。net框架就被设计成在公共语言运行时(CLR)上支持各种不同的编程语言。CLR为这些语言提供共享服务,从世界级的GC和JIT到沙盒安全模型,再到用于调试和分析的工具集成。共享这些特性对CLR上的语言有两个巨大的好处。首先,实现一门语言更容易,因为许多困难的工程工作已经为您完成了。其次,更重要的是,这些语言可以无缝地协同工作,共享库和框架,这样每种语言都可以建立在其他语言的基础上。目前,CLR对动态语言有很好的支持。IronPython-1.0演示了这一点。新的动态语言运行时(Dynamic Language Runtime, DLR)向CLR添加了一组关键特性,使其性能显著提高。它向平台添加了一组明确设计用于满足动态语言需求的服务。这些特性包括共享的动态类型系统、标准的托管模型以及对生成快速动态代码的支持。有了这些额外的特性,在。net上构建高质量的动态语言实现变得非常容易。更重要的是,这些特性使所有使用DLR的动态语言能够自由地与其他动态语言以及平台上现有的强大静态语言(如VB)共享代码。。NET和c#。
{"title":"Bringing dynamic languages to .NET with the DLR","authors":"Jim Hugunin","doi":"10.1145/1297081.1297083","DOIUrl":"https://doi.org/10.1145/1297081.1297083","url":null,"abstract":"From the beginning, Microsoft's .NET framework was designed to support a broad range of different programming languages on a Common Language Runtime (CLR). The CLR provides shared services to these languages ranging from a world-class GC and JIT to a sandboxed security model to tools integration for debugging and profiling. Sharing these features has two huge benefits for languages on the CLR. First, it's easier to implement a language because lots of difficult engineering work is already done for you. Second, and more importantly, these languages can seamlessly work together and share libraries and frameworks so that each language can build on the work of the others. The CLR has good support for dynamic languages today. IronPython-1.0 demonstrates this. The new Dynamic Language Runtime (DLR) adds a small set of key features to the CLR to make it dramatically better. It adds to the platform a set of services designed explicitly for the needs of dynamic languages. These include a shared dynamic type system, standard hosting model and support to make it easy to generate fast dynamic code. With these additional features it becomes dramatically easier to build high-quality dynamic language implementations on .NET. More importantly, these features enable all of the dynamic languages which use the DLR to freely share code with other dynamic languages as well as with the existing powerful static languages on the platform such as VB.NET and C#.","PeriodicalId":344101,"journal":{"name":"Dynamic Languages Symposium","volume":"13 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2007-10-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"115351950","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
D. Ancona, M. Ancona, Antonio Cuni, Nicholas D. Matsakis
Although the C-based interpreter of Python is reasonably fast, implementations on the CLI or the JVM platforms offers some advantages in terms of robustness and interoperability. Unfortunately, because the CLI and JVM are primarily designed to execute statically typed, object-oriented languages, most dynamic language implementations cannot use the native bytecodes for common operations like method calls and exception handling; as a result, they are not able to take full advantage of the power offered by the CLI and JVM. We describe a different approach that attempts to preserve the flexibility of Python, while still allowing for efficient execution. This is achieved by limiting the use of the more dynamic features of Python to an initial, bootstrapping phase. This phase is used to construct a final RPython (Restricted Python) program that is actually executed. RPython is a proper subset of Python, is statically typed, and does not allow dynamic modification of class or method definitions; however, it can still take advantage of Python features such as mixins and first-class methods and classes. This paper presents an overview of RPython, including its design and its translation to both CLI and JVM bytecode. We show how the bootstrapping phase can be used to implement advanced features, like extensible classes and generative programming. We also discuss what work remains before RPython is truly ready for general use, and compare the performance of RPython with that of other approaches.
{"title":"RPython: a step towards reconciling dynamically and statically typed OO languages","authors":"D. Ancona, M. Ancona, Antonio Cuni, Nicholas D. Matsakis","doi":"10.1145/1297081.1297091","DOIUrl":"https://doi.org/10.1145/1297081.1297091","url":null,"abstract":"Although the C-based interpreter of Python is reasonably fast, implementations on the CLI or the JVM platforms offers some advantages in terms of robustness and interoperability. Unfortunately, because the CLI and JVM are primarily designed to execute statically typed, object-oriented languages, most dynamic language implementations cannot use the native bytecodes for common operations like method calls and exception handling; as a result, they are not able to take full advantage of the power offered by the CLI and JVM.\u0000 We describe a different approach that attempts to preserve the flexibility of Python, while still allowing for efficient execution. This is achieved by limiting the use of the more dynamic features of Python to an initial, bootstrapping phase. This phase is used to construct a final RPython (Restricted Python) program that is actually executed. RPython is a proper subset of Python, is statically typed, and does not allow dynamic modification of class or method definitions; however, it can still take advantage of Python features such as mixins and first-class methods and classes.\u0000 This paper presents an overview of RPython, including its design and its translation to both CLI and JVM bytecode. We show how the bootstrapping phase can be used to implement advanced features, like extensible classes and generative programming. We also discuss what work remains before RPython is truly ready for general use, and compare the performance of RPython with that of other approaches.","PeriodicalId":344101,"journal":{"name":"Dynamic Languages Symposium","volume":"28 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2007-10-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"121253821","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Arjun Guha, Jacob Matthews, R. Findler, S. Krishnamurthi
The analogy between types and contracts raises the question of how many features of static type systems can be expressed as dynamic contracts. An important feature missing in prior work on contracts is parametricity, as represented by the polymorphic types in languages like Standard ML. We present a contract counterpart to parametricity. We explore multiple designs for such a system and present one that is simple and incurs minimal execution overhead. We show how to extend the notion of contract blame to our definition. We present a form of inference that can often save programmers from having to explicitly instantiate many parametric contracts. Finally, we present several examples that illustrate how this system mimics the feel and properties of parametric polymorphism in typed languages.
{"title":"Relationally-parametric polymorphic contracts","authors":"Arjun Guha, Jacob Matthews, R. Findler, S. Krishnamurthi","doi":"10.1145/1297081.1297089","DOIUrl":"https://doi.org/10.1145/1297081.1297089","url":null,"abstract":"The analogy between types and contracts raises the question of how many features of static type systems can be expressed as dynamic contracts. An important feature missing in prior work on contracts is parametricity, as represented by the polymorphic types in languages like Standard ML.\u0000 We present a contract counterpart to parametricity. We explore multiple designs for such a system and present one that is simple and incurs minimal execution overhead. We show how to extend the notion of contract blame to our definition. We present a form of inference that can often save programmers from having to explicitly instantiate many parametric contracts. Finally, we present several examples that illustrate how this system mimics the feel and properties of parametric polymorphism in typed languages.","PeriodicalId":344101,"journal":{"name":"Dynamic Languages Symposium","volume":"02 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2007-10-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"127452919","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
The DDP (Demand-driven/Pruning) analysis algorithm allows us to perform data-flow analyses of programming languages that are dynamically typed and have higher-order control flow, such as Smalltalk or Scheme. Because it is demand-driven and employs search pruning, it scales to large code bases. However, versions of the algorithm previously described [19] do not handle data polymorphism well, conservatively merging separate data flows that go through distinct instantiations of a collection type. In this paper, we describe a new extension to DDP that helps to disentangle these flows, permitting more precise results. The extension is based on source-tagging classes so that each reference to a class in the source code yields a subdivision of the type associated with that class. An initial implementation of this polyvariant analysis has been added to the DDP-based tool Chuck, a part of the integrated Squeak program-development environment; we show examples of the tool in action.
{"title":"Dynamic data polyvariance using source-tagged classes","authors":"S. Spoon, O. Shivers","doi":"10.1145/1146841.1146845","DOIUrl":"https://doi.org/10.1145/1146841.1146845","url":null,"abstract":"The DDP (Demand-driven/Pruning) analysis algorithm allows us to perform data-flow analyses of programming languages that are dynamically typed and have higher-order control flow, such as Smalltalk or Scheme. Because it is demand-driven and employs search pruning, it scales to large code bases. However, versions of the algorithm previously described [19] do not handle data polymorphism well, conservatively merging separate data flows that go through distinct instantiations of a collection type. In this paper, we describe a new extension to DDP that helps to disentangle these flows, permitting more precise results. The extension is based on source-tagging classes so that each reference to a class in the source code yields a subdivision of the type associated with that class. An initial implementation of this polyvariant analysis has been added to the DDP-based tool Chuck, a part of the integrated Squeak program-development environment; we show examples of the tool in action.","PeriodicalId":344101,"journal":{"name":"Dynamic Languages Symposium","volume":"16 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2005-10-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"132366984","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
W. Meuter, É. Tanter, S. Mostinckx, T. V. Cutsem, J. Dedecker
In the emerging field of Ambient Intelligence (AmI), software is deployed in wireless open networks of mobile devices. Such open networks require stringent security measures as unknown and untrusted hosts may join the network. In an object-oriented language, where objects are distributed and moved across the network, it thus becomes important to be able to enforce object encapsulation. In contemporary object-oriented programming languages, powerful operations such as object extension (inheritance), cloning and reflection, are typically provided via omnipotent language operators that fail to uphold object encapsulation, because they can be applied without the explicit consent of the concerned object. This paper formulates a language design principle --extreme encapsulation-- that precludes the use of such harmful operators, and proposes a corresponding language feature --method attributes-- that makes it possible to provide the flexibility of object extension, cloning and reflection without compromising on object encapsulation. Although some existing object-based languages can be said to support extreme encapsulation, our contribution is to support it in a delegation-based, prototype-based language named ChitChat.
{"title":"Flexible object encapsulation for ambient-oriented programming","authors":"W. Meuter, É. Tanter, S. Mostinckx, T. V. Cutsem, J. Dedecker","doi":"10.1145/1146841.1146843","DOIUrl":"https://doi.org/10.1145/1146841.1146843","url":null,"abstract":"In the emerging field of Ambient Intelligence (AmI), software is deployed in wireless open networks of mobile devices. Such open networks require stringent security measures as unknown and untrusted hosts may join the network. In an object-oriented language, where objects are distributed and moved across the network, it thus becomes important to be able to enforce object encapsulation. In contemporary object-oriented programming languages, powerful operations such as object extension (inheritance), cloning and reflection, are typically provided via omnipotent language operators that fail to uphold object encapsulation, because they can be applied without the explicit consent of the concerned object. This paper formulates a language design principle --extreme encapsulation-- that precludes the use of such harmful operators, and proposes a corresponding language feature --method attributes-- that makes it possible to provide the flexibility of object extension, cloning and reflection without compromising on object encapsulation. Although some existing object-based languages can be said to support extreme encapsulation, our contribution is to support it in a delegation-based, prototype-based language named ChitChat.","PeriodicalId":344101,"journal":{"name":"Dynamic Languages Symposium","volume":"1 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2005-10-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"125684769","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Compile-time meta-programming allows programs to be constructed by the user at compile-time. Although LISP derived languages have long had such facilities, few modern languages are capable of compile-time meta-programming, and of those that do many of the most powerful are statically typed functional languages. In this paper I present the dynamically typed object orientated language Converge which allows compile-time meta-programming in the spirit of Template Haskell. Converge demonstrates that integrating powerful, safe compile-time meta-programming features into a dynamic language requires few restrictions to the flexible development style facilitated by the paradigm. In this paper I detail Converge's compile-time meta-programming facilities, much of which is adapted from Template Haskell, contain several features new to the paradigm. Finally I explain how such a facility might be integrated into similar languages.
{"title":"Compile-time meta-programming in a dynamically typed OO language","authors":"L. Tratt","doi":"10.1145/1146841.1146846","DOIUrl":"https://doi.org/10.1145/1146841.1146846","url":null,"abstract":"Compile-time meta-programming allows programs to be constructed by the user at compile-time. Although LISP derived languages have long had such facilities, few modern languages are capable of compile-time meta-programming, and of those that do many of the most powerful are statically typed functional languages. In this paper I present the dynamically typed object orientated language Converge which allows compile-time meta-programming in the spirit of Template Haskell. Converge demonstrates that integrating powerful, safe compile-time meta-programming features into a dynamic language requires few restrictions to the flexible development style facilitated by the paradigm. In this paper I detail Converge's compile-time meta-programming facilities, much of which is adapted from Template Haskell, contain several features new to the paradigm. Finally I explain how such a facility might be integrated into similar languages.","PeriodicalId":344101,"journal":{"name":"Dynamic Languages Symposium","volume":"24 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2005-10-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"130219344","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
We introduce Higher Order Messaging, a higher order programming mechanism for dynamic object-oriented languages. Higher Order Messages allow user-defined message dispatch mechanism to be expressed using an optimally compact syntax that is a natural extension of plain messaging and also have a simple conceptual model. They can be implemented without extending the base language and operate through language bridges.
{"title":"Higher order messaging","authors":"Marcel Weiher, Stéphane Ducasse","doi":"10.1145/1146841.1146844","DOIUrl":"https://doi.org/10.1145/1146841.1146844","url":null,"abstract":"We introduce Higher Order Messaging, a higher order programming mechanism for dynamic object-oriented languages. Higher Order Messages allow user-defined message dispatch mechanism to be expressed using an optimally compact syntax that is a natural extension of plain messaging and also have a simple conceptual model. They can be implemented without extending the base language and operate through language bridges.","PeriodicalId":344101,"journal":{"name":"Dynamic Languages Symposium","volume":"47 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2005-10-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"115028480","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}