Open Access. Powered by Scholars. Published by Universities.®

Portland State University

Discipline
Keyword
Publication Year
Publication
Publication Type

Articles 1 - 30 of 33

Full-Text Articles in Programming Languages and Compilers

Making Curry With Rice: An Optimizing Curry Compiler, Steven Libby Jun 2022

Making Curry With Rice: An Optimizing Curry Compiler, Steven Libby

Dissertations and Theses

In this dissertation we present the RICE optimizing compiler for the functional logic language Curry. This is the first general optimizing compiler for a functional logic language. Our work is based on the idea of compiling through program transformations, which we have adapted from the functional language compiler community. We also present the GAS system for generating new program transformations, which uses the power of functional logic programming to provide a flexible framework for describing transformations. This allows us to describe and implement a wide range of optimizations including inlining, shortcut deforestation, unboxing, and case shortcutting, a new optimization we …


Functional Programming For Systems Software: Implementing Baremetal Programs In Habit, Donovan Ellison Jul 2020

Functional Programming For Systems Software: Implementing Baremetal Programs In Habit, Donovan Ellison

University Honors Theses

Programming in a baremetal environment, directly on top of hardware with very little to help manage memory or ensure safety, can be dangerous even for experienced programmers. Programming languages can ease the burden on developers and sometimes take care of entire sets of errors. This is not the case for a language like C that will do almost anything you want, for better or worse. To operate in a baremetal environment often requires direct control over memory, but it would be nice to have that capability without sacrificing safety guarantees. Rust is a new language that aims to fit this …


A New Functional-Logic Compiler For Curry: Sprite, Sergio Antoy, Andy Jost Jul 2018

A New Functional-Logic Compiler For Curry: Sprite, Sergio Antoy, Andy Jost

Computer Science Faculty Publications and Presentations

We introduce a new native code compiler for Curry codenamed Sprite. Sprite is based on the Fair Scheme, a compilation strategy that provides instructions for transforming declarative, non-deterministic programs of a certain class into imperative, deterministic code. We outline salient features of Sprite, discuss its implementation of Curry programs, and present benchmarking results. Sprite is the first-to-date operationally complete implementation of Curry. Preliminary results show that ensuring this property does not incur a significant penalty.


When Good Components Go Bad: Formally Secure Compilation Despite Dynamic Compromise, Guglielmo Fachini, CăTăLin Hriţcu, Marco Stronati, Arthur Azevedo De Amorim, Carmine Abate, Roberto Blanco, Théo Laurent, Benjamin C. Pierce, Andrew Tolmach Feb 2018

When Good Components Go Bad: Formally Secure Compilation Despite Dynamic Compromise, Guglielmo Fachini, CăTăLin Hriţcu, Marco Stronati, Arthur Azevedo De Amorim, Carmine Abate, Roberto Blanco, Théo Laurent, Benjamin C. Pierce, Andrew Tolmach

Computer Science Faculty Publications and Presentations

We propose a new formal criterion for secure compilation, giving strong end-to-end security guarantees for software components written in unsafe, low-level languages with C-style undefined behavior. Our criterion is the first to model dynamic compromise in a system of mutually distrustful components running with least privilege. Each component is protected from all the others—in particular, from components that have encountered undefined behavior and become compromised. Each component receives secure compilation guarantees up to the point when it becomes compromised, after which an attacker can take complete control over the component and use any of its privileges to attack the remaining …


Grace's Inheritance, James Noble, Andrew P. Black, Kim B. Bruce, Michael Homer, Timothy Jones Jan 2017

Grace's Inheritance, James Noble, Andrew P. Black, Kim B. Bruce, Michael Homer, Timothy Jones

Computer Science Faculty Publications and Presentations

This article is an apologia for the design of inheritance in the Grace educational programming language: it explains how the design of Grace’s inheritance draws from inheritance mechanisms in predecessor languages, and defends that design as the best of the available alternatives. For simplicity, Grace objects are generated from object constructors, like those of Emerald, Lua, and Javascript; for familiarity, the language also provides classes and inheritance, like Simula, Smalltalk and Java. The design question we address is whether or not object constructors can provide an inheritance semantics similar to classes.


Scalable Equivalence Checking For Behavioral Synthesis, Zhenkun Yang Aug 2015

Scalable Equivalence Checking For Behavioral Synthesis, Zhenkun Yang

Dissertations and Theses

Behavioral synthesis is the process of compiling an Electronic System Level (ESL) design to a register-transfer level (RTL) implementation. ESL specifications define the design functionality at a high level of abstraction (e.g., with C/C++ or SystemC), and thus provide a promising approach to address the exacting demands to develop feature-rich, optimized, and complex hardware systems within aggressive time-to-market schedules. Behavioral synthesis entails application of complex and error-prone transformations during the compilation process. Therefore, the adoption of behavioral synthesis highly depends on our ability to ensure that the synthesized RTL conforms to the ESL description. This dissertation provides an end-to-end scalable …


The Expression Problem, Gracefully, Andrew P. Black Jan 2015

The Expression Problem, Gracefully, Andrew P. Black

Computer Science Faculty Publications and Presentations

The “Expression Problem” was brought to prominence by Wadler in 1998. It is widely regarded as illustrating that the two mainstream approaches to data abstraction — procedural abstraction and type abstraction— are complementary, with the strengths of one being the weaknesses of the other. Despite an extensive literature, the origin of the problem remains ill-understood. I show that the core problem is in fact the use of global constants, and demonstrate that an important aspect of the problem goes away when Java is replaced by a language like Grace, which eliminates them.


The Grace Programming Language Draft Specification Version 0.5. 2025, Andrew P. Black, Kim B. Bruce, James Noble Jan 2015

The Grace Programming Language Draft Specification Version 0.5. 2025, Andrew P. Black, Kim B. Bruce, James Noble

Computer Science Faculty Publications and Presentations

This is a specification of the Grace Programming Language. This specification is notably incomplete, and everything is subject to change. For discussion and rationale, see http://gracelang.org.


The Nax Language: Unifying Functional Programming And Logical Reasoning In A Language Based On Mendler-Style Recursion Schemes And Term-Indexed Types, Ki Yung Ahn Dec 2014

The Nax Language: Unifying Functional Programming And Logical Reasoning In A Language Based On Mendler-Style Recursion Schemes And Term-Indexed Types, Ki Yung Ahn

Dissertations and Theses

Two major applications of lambda calculi in computer science are functional programming languages and mechanized reasoning systems (or, proof assistants). According to the Curry--Howard correspondence, it is possible, in principle, to design a unified language based on a typed lambda calculus for both logical reasoning and programming. However, the different requirements of programming languages and reasoning systems make it difficult to design such a unified language that provides both. Programming languages usually extend lambda calculi with programming-friendly features (e.g., recursive datatypes, general recursion) for supporting the flexibility to model various computations, while sacrificing logical consistency. Logical reasoning systems usually extend …


The Grace Programming Language Draft Specification Version 0.3.53, Andrew P. Black, Kim B. Bruce, James Noble Aug 2013

The Grace Programming Language Draft Specification Version 0.3.53, Andrew P. Black, Kim B. Bruce, James Noble

Computer Science Faculty Publications and Presentations

This is a specification of the Grace Programming Language. This specification is notably incomplete and everything is subject to change. In particular, this version does not address the library, nested static type system, module system, metadata, immutable data and pure methods, and other areas. For discussion and rationale, see http://gracelang.org.

It is designed for use by university students learning programming in CS1 and CS2 classes that are based on object-oriented programming, faculty and teaching assistants developing materials for 1st and 2nd year programming classes, programming researchers needing an object-oriented programming language as a research vehicle, and programming designers in search …


Type Classes And Instance Chains: A Relational Approach, John Garrett Morris Jun 2013

Type Classes And Instance Chains: A Relational Approach, John Garrett Morris

Dissertations and Theses

Type classes, first proposed during the design of the Haskell programming language, extend standard type systems to support overloaded functions. Since their introduction, type classes have been used to address a range of problems, from typing ordering and arithmetic operators to describing heterogeneous lists and limited subtyping. However, while type class programming is useful for a variety of practical problems, its wider use is limited by the inexpressiveness and hidden complexity of current mechanisms. We propose two improvements to existing class systems. First, we introduce several novel language features, instance chains and explicit failure, that increase the expressiveness of type …


Object-Oriented Programming: Some History, And Challenges For The Next Fifty Years, Andrew P. Black Mar 2013

Object-Oriented Programming: Some History, And Challenges For The Next Fifty Years, Andrew P. Black

Computer Science Faculty Publications and Presentations

Object-oriented programming is inextricably linked to the pioneering work of Ole-Johan Dahl and Kristen Nygaard on the design of the Simula language, which started at the Norwegian Computing Centre in the Spring of 1961. However, object-orientation, as we think of it today—fifty years later—is the result of a complex interplay of ideas, constraints and people. Dahl and Nygaard would certainly recognize it as their progeny, but might also be amazed at how much it has grown up. This article is based on a lecture given on 22nd August 2011, on the occasion of the scientific opening of the Ole-Johan …


Interactive Ambient Visualizations For Soft Advice, Emerson Murphy-Hill, Titus Barik, Andrew P. Black Jan 2013

Interactive Ambient Visualizations For Soft Advice, Emerson Murphy-Hill, Titus Barik, Andrew P. Black

Computer Science Faculty Publications and Presentations

Some software packages offer the user soft advice: recommendations that are intended to help the user create high quality artifacts, but which may turn out to be bad advice. It is left to the user to determine whether the soft advice really will improve quality, and to decide whether or not to adopt it. Visualizations can help the user in making this decision, but we believe that conventional visualizations are less than ideal. In this paper, we describe an interactive ambient visualization to help users identify, understand and interpret soft advice.

Our visualization was developed to help programmers interpret code …


The Grace Programming Language Draft Specification Version 0.3.1261, Andrew P. Black, Kim B. Bruce, James Noble Jan 2013

The Grace Programming Language Draft Specification Version 0.3.1261, Andrew P. Black, Kim B. Bruce, James Noble

Computer Science Faculty Publications and Presentations

This is a specification of the Grace Programming Language. This specification is notably incomplete, and everything is subject to change.


Modules And Dialects As Objects In Grace, Michael Homer, James Noble, Kim B. Bruce, Andrew P. Black Jan 2013

Modules And Dialects As Objects In Grace, Michael Homer, James Noble, Kim B. Bruce, Andrew P. Black

Computer Science Faculty Publications and Presentations

Grace is a gradually typed, object-oriented language for use in education; consonant with that use, we have tried to keep Grace as simple and straightforward as possible. Grace needs a module system for several reasons: to teach students about modular program design, to organise large programs, especially its self-hosted implementation, to provide access to resources defined in other languages, and to support different “dialects”—language subsets, or domain specific languages, for particular parts of the curriculum. Grace already has several organising constructs; this paper describes how Grace uses two of them, objects and lexical scope, to provide modules and dialects.


The Basic Scheme For The Evaluation Of Functional Logic Programs, Arthur Peters Jan 2012

The Basic Scheme For The Evaluation Of Functional Logic Programs, Arthur Peters

Dissertations and Theses

Functional logic languages provide a powerful programming paradigm combining the features of functional languages and logic languages. However, current implementations of functional logic languages are complex, slow, or both. This thesis presents a scheme, called the Basic Scheme, for compiling and executing functional logic languages based on non-deterministic graph rewriting. This thesis also describes the implementation and optimization of a prototype of the Basic Scheme. The prototype is simple and performs well compared to other current implementations.


Parallel Sorting On A Spatial Computer, Max Orhai, Andrew P. Black Jan 2012

Parallel Sorting On A Spatial Computer, Max Orhai, Andrew P. Black

Computer Science Faculty Publications and Presentations

We describe a parallel sort for a spatial computer that requires minimal communication. We show simulations of the sort in 1 and 2 dimensions.

Presentation slides are located below in the Additional Files


Patterns As Objects In Grace, Andrew P. Black, Michael Homer, James Noble, David J. Pearce, Kim B. Bruce Jan 2012

Patterns As Objects In Grace, Andrew P. Black, Michael Homer, James Noble, David J. Pearce, Kim B. Bruce

Computer Science Faculty Publications and Presentations

Object orientation and pattern matching are often seen as conflicting approaches to program design. Object oriented programs place type-dependent behaviour inside objects and invoke it via dynamic dispatch, while pattern matching programs place type-dependent behaviour outside data structures and invoke it via multiway conditionals (case statements). Grace is a new, dynamic, object-oriented language designed to support teaching: to this end, Grace needs to support both styles. In this paper we explain how this conflict can be resolved gracefully: by modelling patterns and cases as partial functions, reifying those functions as first-class objects, and then building up complex patterns from simpler …


Operational Verification Of A Relativistic Program, Robert T. Bauer Jun 2009

Operational Verification Of A Relativistic Program, Robert T. Bauer

Computer Science Faculty Publications and Presentations

Engineering eorts to achieve scalable multiprocessor perfor- mance for concurrent reader-writer programs have resulted in a family of algorithms that are non-blocking and that tolerate interprocessor in- terference. Because these algorithms accept a unique frame of reference for each processor's accesses to memory, they typify a concurrent pro- gramming technique for shared memory multicore architectures called relativistic programmming.

Rigorous verification of these algorithms is not possible with existing semantic based approaches because the semantics under approximates multiprocessor behavior and the algorithms rely on abstruse interactions with the operating system that aren't reconciled with language seman- tics.

The Read-Copy Update (RCU) …


The Design And Implementation Of A Safe, Lightweight Haskell Compiler, Timothy Jan Chevalier May 2009

The Design And Implementation Of A Safe, Lightweight Haskell Compiler, Timothy Jan Chevalier

Computer Science Faculty Publications and Presentations

Typed programming languages offer safety guarantees that help programmers write correct code, but typical language implementations offer no proof that source-level guarantees extend to executable code. Moreover, typical implementations link programs with unsafe runtime system (RTS) code. I present a compiler for the functional language Haskell that preserves some of the properties of Haskell’s type system. The soundness proof for the combination of the compiler and a verified RTS requires a proof that the compiler emits code that cooperates correctly with the RTS. In particular, the latter proof must address the boundary between the user program and the garbage collector. …


Squeak By Example, Andrew P. Black, Stéphane Ducasse, Oscar Nierstrasz, Damien Pollet, Damien Cassou, Marcus Denker Jan 2009

Squeak By Example, Andrew P. Black, Stéphane Ducasse, Oscar Nierstrasz, Damien Pollet, Damien Cassou, Marcus Denker

Computer Science Faculty Publications and Presentations

Squeak is a modern open-source development environment for the classic Smalltalk-80 programming language. This book, intended for both students and developers, will guide you gently through the language and tools by means of a series of examples and exercises.

Additional material is available from the book's web page at SqueakByExample.org.


Better Refactoring Tools For A Better Refactoring Strategy, Andrew P. Black Feb 2008

Better Refactoring Tools For A Better Refactoring Strategy, Andrew P. Black

Computer Science Faculty Publications and Presentations

Refactoring tools can improve the speed and accuracy with which we create and maintain software – but only if they are used. In practice, tools are not used as much as they could be; this seems to be because they do not align with the refactoring strategy preferred by the majority of programmers: floss refactoring. We propose five principles that characterize successful floss refactoring tools – principles that can help programmers to choose the most appropriate refactoring tools and also help toolsmiths to design more usable tools.


A Framework For Relationship Pattern Languages, Sudarshan Murthy, David Maier Feb 2008

A Framework For Relationship Pattern Languages, Sudarshan Murthy, David Maier

Computer Science Faculty Publications and Presentations

A relationship pattern is an abstraction of a recurring need when establishing relationships among information elements in specific contexts. By developing or leveraging a relationship pattern, modelers can solve a class of problems once and describe many relationship types at once. We have developed a framework for specifying relationship patterns and pattern languages (sets of patterns) in both modeling-language-independent and modeling-language-specific ways. We describe this framework both informally and formally. We provide examples of some commonly observed relationship patterns and show how to use them in ER with the help of a relationship pattern language called Exemplar. We also provide …


Scalable Concurrent Hash Tables Via Relativistic Programming, Josh Triplett Jan 2008

Scalable Concurrent Hash Tables Via Relativistic Programming, Josh Triplett

Computer Science Faculty Publications and Presentations

Existing approaches to concurrent programming often fail to account for synchronization costs on modern shared-memory multipro- cessor architectures. A new approach to concurrent programming, known as relativistic programming, can reduce or in some cases eliminate synchronization overhead on such architectures. This approach avoids the costs of inter-processor communication and memory access by permitting processors to operate from a relativistic view of memory provided by their own caches, rather than from an absolute reference frame of memory as seen by all processors. This research shows how relativistic programming techniques can provide the perceived advantages of optimistic synchronization without the useless parallelism …


Patterns Of Aspect-Oriented Design, Black P. Andrew, James Noble, David J. Pearce, Arno Scmidmeir Jan 2008

Patterns Of Aspect-Oriented Design, Black P. Andrew, James Noble, David J. Pearce, Arno Scmidmeir

Computer Science Faculty Publications and Presentations

Aspect-oriented programming languages are becoming commonplace, and programmers are accumulating experience in building and maintaining aspect-oriented systems. This paper addresses how the use of these languages affects program design: how aspect-oriented languages change the design space, which designs should be emulated and which avoided, and the strengths and weaknesses of particular kinds of design. We identify five patterns of aspect-oriented design: Spectator, Regulator, Patch, Extension, and Heterarchical Design. For each pattern, we describe the problem it solves, show how aspect-oriented language features are used in the pattern, give characteristic examples of the pattern’s use, and assess its benefits and liabilities. …


Directflow: A Domain-Specific Language For Information-Flow Systems, Andrew P. Black, Chuan-Kai Lin Jan 2007

Directflow: A Domain-Specific Language For Information-Flow Systems, Andrew P. Black, Chuan-Kai Lin

Computer Science Faculty Publications and Presentations

Programs that process streams of information are commonly built by assembling reusable information-flow components. In some systems the components must be chosen from a pre-defined set of primitives; in others the programmer can create new custom components using a general-purpose programming language. Neither approach is ideal: restricting programmers to a set of primitive components limits the expressivity of the system, while allowing programmers to define new components in a general-purpose language makes it difficult or impossible to reason about the composite system. We advocate defining information-flow components in a domain-specific language (DSL) that enables us to infer the properties of …


Why Don’T People Use Refactoring Tools?, Andrew P. Black, Emerson Murphy-Hill Jan 2007

Why Don’T People Use Refactoring Tools?, Andrew P. Black, Emerson Murphy-Hill

Computer Science Faculty Publications and Presentations

Tools that perform refactoring are currently under-utilized by programmers. As more advanced refactoring tools are designed, a great chasm widens between how the tools must be used and how programmers want to use them. In this position paper, we characterize the dominant process of refactoring, demonstrate that many research tools do not support this process, and initiate a call to action for designers of future refactoring tools.


Cache Coherence Protocol Verification Using Ωmega, Ki Yung Ahn Jan 2007

Cache Coherence Protocol Verification Using Ωmega, Ki Yung Ahn

Computer Science Faculty Publications and Presentations

We verify some correctness properties of the DASH cache coherence protocol using Ωmega. Ωmega is a language with a rich type system featuring GADTs, type functions, and user-guided type checking rules. Cache coherence protocols have both safety properties and liveness properties. We show how to describe some of the safety properties of DASH cache coherence protocol in mega. Since liveness properties are not easily expressed by types, we investigate invariants sufficient to imply some of the liveness properties of concern, and assert those invariants as well in the type system of Ωmega. Using Ωmega, we can have both a working …


A Software Architecture For Reconstructability Analysis, Kenneth Willett, Martin Zwick Jan 2004

A Software Architecture For Reconstructability Analysis, Kenneth Willett, Martin Zwick

Systems Science Faculty Publications and Presentations

Software packages for reconstructability analysis (RA), as well as for related log linear modeling, generally provide a fixed set of functions. Such packages are suitable for end‐users applying RA in various domains, but do not provide a platform for research into the RA methods themselves. A new software system, Occam3, is being developed which is intended to address three goals which often conflict with one another to provide: a general and flexible infrastructure for experimentation with RA methods and algorithms; an easily‐configured system allowing methods to be combined in novel ways, without requiring deep software expertise; and a system which …


A Browser For Incremental Programming, Andrew P. Black Sep 2003

A Browser For Incremental Programming, Andrew P. Black

Computer Science Faculty Publications and Presentations

Much of the elegance and power of Smalltalk comes from its programming environment and tools. First introduced more than 20 years ago, the Smalltalk browser enables programmers to “home in” on particular methods using a hierarchy of manually-defined classifications. By its nature, this classification scheme says a lot about the desired state of the code, but little about the actual state of the code as it is being developed. We have extended the Smalltalk browser with dynamically computed virtual categories that dramatically improve the browser’s support for incremental programming. We illustrate these improvements by example, and describe the algorithms used …