<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="static/style.xsl"?><OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd"><responseDate>2026-09-19T07:00:15Z</responseDate><request verb="GetRecord" identifier="oai:drum.lib.umd.edu:1903/9958" metadataPrefix="dim">https://api.drum.lib.umd.edu/server/oai/request</request><GetRecord><record><header><identifier>oai:drum.lib.umd.edu:1903/9958</identifier><datestamp>2016-03-29T05:16:38Z</datestamp><setSpec>com_1903_2224</setSpec><setSpec>com_1903_12</setSpec><setSpec>com_1903_2</setSpec><setSpec>col_1903_2756</setSpec><setSpec>col_1903_3</setSpec></header><metadata><dim:dim xmlns:dim="http://www.dspace.org/xmlns/dspace/dim" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:doc="http://www.lyncode.com/xoai" xsi:schemaLocation="http://www.dspace.org/xmlns/dspace/dim http://www.dspace.org/schema/dim.xsd">
   <dim:field mdschema="dc" element="contributor" qualifier="advisor" lang="en_US">Foster, Jeffrey S</dim:field>
   <dim:field mdschema="dc" element="contributor" qualifier="author" lang="en_US">Furr, Michael</dim:field>
   <dim:field mdschema="dc" element="contributor" qualifier="publisher" lang="en_US">Digital Repository at the University of Maryland</dim:field>
   <dim:field mdschema="dc" element="contributor" qualifier="publisher" lang="en_US">University of Maryland (College Park, Md.)</dim:field>
   <dim:field mdschema="dc" element="contributor" qualifier="department" lang="en_US">Computer Science</dim:field>
   <dim:field mdschema="dc" element="date" qualifier="accessioned">2010-02-19T06:59:25Z</dim:field>
   <dim:field mdschema="dc" element="date" qualifier="available">2010-02-19T06:59:25Z</dim:field>
   <dim:field mdschema="dc" element="date" qualifier="issued" lang="en_US">2009</dim:field>
   <dim:field mdschema="dc" element="identifier" qualifier="uri">http://hdl.handle.net/1903/9958</dim:field>
   <dim:field mdschema="dc" element="description" qualifier="abstract" lang="en_US">Many popular scripting languages such as Ruby, Python, and Perl are

dynamically typed.  Dynamic typing provides many advantages such as

terse, flexible code and the ability to use highly dynamic language

constructs, such as an eval method that evaluates a string as

program text.  However these dynamic features have traditionally

obstructed static analyses leaving the programmer without the benefits

of static typing, including early error detection and the

documentation provided by type annotations.

In this dissertation, we present Diamondback Ruby (DRuby), a tool that

blends static and dynamic typing for Ruby.  DRuby provides a type

language that is rich enough to precisely type Ruby code, without

unneeded complexity.  DRuby uses static type inference to

automatically discover type errors in Ruby programs and provides a

type annotation language that serves as verified documentation of a

method's behavior.  When necessary, these annotations can be checked

dynamically using runtime contracts.  This allows statically and

dynamically checked code to safely coexist, and any runtime errors are

properly blamed on dynamic code.  To handle dynamic features such as

eval, DRuby includes a novel dynamic analysis and

transformation that gathers per-application profiles of dynamic

feature usage via a program's test suite.  Based on these profiles,

DRuby transforms the program before applying its type inference

algorithm, enforcing type safety for dynamic constructs.  By

leveraging a program's test suite, our technique gives the programmer

an easy to understand trade-off: the more dynamic features covered by

their tests, the more static checking is achieved.

We evaluated DRuby on a benchmark suite of sample Ruby programs.  We

found that our profile-guided analysis and type inference algorithms

worked well, discovering several previously unknown type errors.

Furthermore, our results give us insight into what kind of Ruby code

programmers ``want'' to write but is not easily amenable to

traditional static typing.  This dissertation shows that it is

possible to effectively integrate static typing into Ruby without

losing the feel of a dynamic language.</dim:field>
   <dim:field mdschema="dc" element="title" lang="en_US">Combining Static and Dynamic Typing in Ruby</dim:field>
   <dim:field mdschema="dc" element="type" lang="en_US">Dissertation</dim:field>
   <dim:field mdschema="dc" element="subject" qualifier="pqcontrolled" lang="en_US">Computer Science</dim:field>
   <dim:field mdschema="dc" element="subject" qualifier="pquncontrolled" lang="en_US">dynamic typing</dim:field>
   <dim:field mdschema="dc" element="subject" qualifier="pquncontrolled" lang="en_US">gradual typing</dim:field>
   <dim:field mdschema="dc" element="subject" qualifier="pquncontrolled" lang="en_US">Profile-guided analysis</dim:field>
   <dim:field mdschema="dc" element="subject" qualifier="pquncontrolled" lang="en_US">Ruby</dim:field>
   <dim:field mdschema="dc" element="subject" qualifier="pquncontrolled" lang="en_US">Scripting Languages</dim:field>
   <dim:field mdschema="others" element="access-status">open.access</dim:field>
</dim:dim>
</metadata></record></GetRecord></OAI-PMH>