Atoms and de Bruijn indices are two well-known representation techniques for data structures that involve names and binders. However, using either technique, it is all too easy to make a programming error that causes ...
详细信息
Atoms and de Bruijn indices are two well-known representation techniques for data structures that involve names and binders. However, using either technique, it is all too easy to make a programming error that causes one name to be used where another was intended. We propose an abstract interface to names and binders that rules out many of these errors. This interface is implemented as a library in AGDA. It allows defining and manipulating term representations in nominal style and in de Bruijn style. The programmer is not forced to choose between these styles: on the contrary, the library allows using both styles in the same program, if desired. Whereas indexing the types of names and terms with a natural number is a well-known technique to better control the use of de Bruijn indices, we index types with worlds. Worlds are at the same time more precise and more abstract than natural numbers. Via logical relations and parametricity, we are able to demonstrate in what sense our library is safe, and to obtain theorems for free about world-polymorphic functions. For instance, we prove that a world-polymorphic term transformation function must commute with any renaming of the free variables. The proof is entirely carried out in AGDA.
Existing macro systems force programmers to make a choice between clarity of specification and robustness. If they choose clarity, they must forgo validating significant parts of the specification and thus produce low...
详细信息
Existing macro systems force programmers to make a choice between clarity of specification and robustness. If they choose clarity, they must forgo validating significant parts of the specification and thus produce low-quality language extensions. If they choose robustness, they must write in a style that mingles the implementation with the specification and therefore obscures the latter. This paper introduces a new language for writing macros. With the new macro system, programmers naturally write robust language extensions using easy-to-understand specifications. The system translates these specifications into validators that detect misuses-including violations of context-sensitive constraints-and automatically synthesize appropriate feedback, eliminating the need for ad hoc validation code.
In case of performance critical applications programmers are often forced to write code at a low abstraction level. This leads to programs that are hard to develop and maintain because the program text is mixed up by ...
详细信息
In case of performance critical applications programmers are often forced to write code at a low abstraction level. This leads to programs that are hard to develop and maintain because the program text is mixed up by low level optimization tricks and is far from the algorithm it implements. Even if compilers are smart nowadays and provide the user with many automatically applied optimizations, practice shows that in some cases it is hopeless to optimize the program automatically without the programmer's knowledge. A complementary approach is to allow the programmer to fine tune the program but provide him with language features that make the optimization easier. These are language abstractions that make optimization techniques explicit without adding too much syntactic noise to the program text. This paper presents such language abstractions for two well-known optimizations: bitvectors and SIMD (Single Instruction Multiple Data). The language features are implemented in the embedded domain specific language Feldspar which is specifically tailored for digital signal processing applications. While we present these language elements as part of Feldspar, the ideas behind them are general enough to be applied in other language definition projects as well. [ABSTRACT FROM AUTHOR]
Programming antipatterns are commonly used patterns that make the code unnecessary complex and unmaintainable. However, beginner programmers such as students, often use them. Usage of antipatterns should be eliminated...
详细信息
Programming antipatterns are commonly used patterns that make the code unnecessary complex and unmaintainable. However, beginner programmers such as students, often use them. Usage of antipatterns should be eliminated from source code. Many antipatterns can be detected at compilation-time with an appropriate parser tool. In this paper we argue for a new lint-like tool that does detect typical programming antipatterns, and it is extensible to task-specific verifications. This tool mainly developed to evaluate students' programs, however it can be used in industrial projects as well. Our approach based on pattern matching on abstract syntax tree provided by Clang parser. We present our description language that specifies the antipatterns. [ABSTRACT FROM AUTHOR]
The article discusses the use of multicore processors and parallel architectures to improve data structures. It argues that a major shift is underway, as of March 2011, in the properties of concurrent data structures ...
详细信息
The article discusses the use of multicore processors and parallel architectures to improve data structures. It argues that a major shift is underway, as of March 2011, in the properties of concurrent data structures and their implementing algorithms. This is expected to cause data structures such as stacks, queues, and heaps to become obsolete, replaced by looser constructs involving randomization and distribution. Software engineers are advised to familiarize themselves with the performance benefits and limitations this involves.
Circus combines constructs to define complex data operations and interactions;it integrates Z and CSP, and, distinctively, it is a language for refinement that can describe programs as well as specification and design...
详细信息
Circus combines constructs to define complex data operations and interactions;it integrates Z and CSP, and, distinctively, it is a language for refinement that can describe programs as well as specification and design models. The semantics is based on the unifying theories of programming (UTP). Most importantly, Circus is representative of a class of refinement-oriented languages that combines facilities to specify abstract data types in a model-based style and patterns of interaction. What we present here is the Circus testing theory;this work is relevant as a foundation for sound test-generation techniques for a plethora of state-rich reactive languages. To cater for data operations, we define symbolic tests and exhaustive test sets. They are the basis for test-generation techniques that can combine coverage criteria for data and transition models. The notion of correctness is Circus refinement, a UTP-based generalisation of failures-divergences refinement that considers data modelling. Proof of exhaustivity exploits the correspondence between the operational and denotational semantics.
The article presents a method for teaching computer programmers to think in terms of parallel algorithms, designed to enable improved programming for multi-processor machines. It involves an Immediate Concurrent Execu...
详细信息
The article presents a method for teaching computer programmers to think in terms of parallel algorithms, designed to enable improved programming for multi-processor machines. It involves an Immediate Concurrent Execution (ICE) abstraction, which is supported by explicit multi-threaded (XMT) computer architecture and parallel random-access machine (PRAM) algorithmics. A workflow using these techniques is described, and the advantages of such an approach over serial algorithms are explicated. The major steps involved in the ranking/merging algorithm are discussed, and a block diagram of the XMT architecture is included.
Computing is not the only way to model and simulate humanities problems. In the specific field of conflict simulation, there is a long and continuing tradition of using manual modelling techniques such as maps and cou...
详细信息
Computing is not the only way to model and simulate humanities problems. In the specific field of conflict simulation, there is a long and continuing tradition of using manual modelling techniques such as maps and counters to create playable games which mirror some of the dynamics of real armed conflicts. computer games are not automatically superior to such manual models, since mass market commercial software focuses far more on entertainment than on realistic simulation, and since the enormous capabilities of computers tend to encourage detailed incorporation of quantifiable technicalities at the expense of the vital but much less tractable human element. The biggest limitation of computer models is their limited transparency and design accessibility for non-programmers such as humanities students and scholars. Manual modelling offers a valuable 'bridge' between computing and traditional humanities scholarship, allowing easier generation and use of specifically tailored models, and building synergistic relationships which foster more widespread and effective adoption of digital techniques.
In addition to drawing upon content experts, librarians, archivists, developers, programmers, managers, and others, many emerging digital projects also pull in disciplinary expertise from areas that do not typically w...
详细信息
In addition to drawing upon content experts, librarians, archivists, developers, programmers, managers, and others, many emerging digital projects also pull in disciplinary expertise from areas that do not typically work in team environments. To be effective, these teams must find processes-some of which are counter to natural individually oriented work habits-which support the larger goals and group-oriented work of these digital projects. This article will explore the similarities and differences in approaches within and between members of the Digital Libraries (DL) and Digital Humanities (DH) communities by formally documenting the nature of collaboration in these teams. While there are many similarities in approaches between DL and DH project teams, some interesting differences exist and may influence the effectiveness of a digital project team with membership that draws from these two communities. Conclusions are focused on supporting strong team processes with recommendations for documentation, communication, training, and the development of team skills and perspectives.
Alive coding movement has arisen from everyday use of interpreted programming environments, where the results of new code can be immediately established. Running algorithms can be modified as they progress. In the con...
详细信息
Alive coding movement has arisen from everyday use of interpreted programming environments, where the results of new code can be immediately established. Running algorithms can be modified as they progress. In the context of arts computing, five coding has become an intriguing movement in the field of real-time performance. It directly confronts the role of computer programmers in new media work by placing their actions, and the consequences of their actions, centrally within a work's setting. This article covers historical precedents, theoretical perspectives and recent practice. Although the contemporary exploration of live coding is associated with the rise of laptop music and visuals, there are many further links to uncover throughout rule-based art. A central issue is the role of a human being within computable structures;it is possible to find examples of live coding that do not require the use of a (digital) computer at all.
暂无评论