text:
[![Gem Version](https://badge.fury.io/rb/rdl.svg)](https://badge.fury.io/rb/rdl) [![Build Status](https://travis-ci.org/tupl-tufts/rdl.svg?branch=master)](https://travis-ci.org/tupl-tufts/rdl)

# Table of Contents

* [Introduction](#introduction)
* [Using RDL](#using-rdl)
  * [Supported versions of Ruby](#supported-versions-of-ruby)
  * [Installing RDL](#installing-rdl)
  * [Loading RDL](#loading-rdl)
  * [Disabling RDL](#disabling-rdl)
  * [Rails](#rails)
  * [Preconditions and Postconditions](#preconditions-and-postconditions)
  * [Type Annotations](#type-annotations)
* [RDL Types](#rdl-types)
  * [Nominal Types](#nominal-types)
  * [Nil Type](#nil-type)
  * [Top Type (%any)](#top-type-any)
  * [Dynamic Type (%dyn)](#dynamic-type-dyn)
  * [Union Types](#union-types)
  * [Intersection Types](#intersection-types)
  * [Optional Argument Types](#optional-argument-types)
  * [Variable Length Argument Types](#variable-length-argument-types)
  * [Named Argument Types](#named-argument-types)
  * [Dependent Types](#dependent-types)
  * [Higher-order Types](#higher-order-types)
  * [Class/Singleton Method Types](#classsingleton-method-types)
  * [Structural Types](#structural-types)
  * [Singleton Types](#singleton-types)
  * [Self Type](#self-type)
  * [Type Aliases](#type-aliases)
  * [Generic Class Types](#generic-class-types)
  * [Tuple Types](#tuple-types)
  * [Finite Hash Types](#finite-hash-types)
  * [Type Casts](#type-casts)
  * [Bottom Type (%bot)](#bottom-type-bot)
  * [Non-null Type](#non-null-type)
  * [Constructor Type](#constructor-type)
* [Static Type Checking](#static-type-checking)
  * [Types for Variables](#types-for-variables)
  * [Tuples, Finite Hashes, and Subtyping](#tuples-finite-hashes-and-subtyping)
  * [Other Features and Limitations](#other-features-and-limitations)
  * [Assumptions](#assumptions)
* [Type-Level Computations](#type-level-computations)
* [RDL Method Reference](#rdl-method-reference)
* [Performance](#performance)
* [Queries](#queries)
* [Configuration](#configuration)
* [Bibliography](#bibliography)
* [Copyright](#copyright)
* [Contributors](#contributors)
* [TODO List](#todo-list)

# Introduction

RDL is a lightweight system for adding types, type checking, and contracts to Ruby.  In RDL, *types* can be used to decorate methods:

```ruby
require 'rdl'
extend RDL::Annotate # add annotation methods to current scope

type '(Integer, Integer) -> String'
def m(x,y) ... end
```

This indicates that `m` returns a `String` if given two `Integer` arguments. When written as above, RDL enforces this type as a *contract* checked at run time: When `m` is called, RDL checks that `m` is given exactly two arguments and both are `Integers`, and that `m` returns an instance of `String`.

RDL can also *statically type check* method bodies against their signatures. For example:

```ruby
file.rb:
  require 'rdl'
  extend RDL::Annotate

  type '(Integer) -> Integer', typecheck: :label
  def id(x)
    "forty-two"
  end

  RDL.do_typecheck :label
```

```
$ ruby file.rb
.../lib/rdl/typecheck.rb:158:in `error':  (RDL::Typecheck::StaticTypeError)
.../file.rb:6:3: error: got type `String' where return type `Integer' expected
.../file.rb:6:   "forty-two"
.../file.rb:6:   ^~~~~~~~~~~
```

Passing `typecheck: sym` for some other symbol statically type checks the method body when `RDL.do_typecheck sym` is called. Passing `typecheck: :call` to `type` statically type checks the method body whenever it is called.

Note that RDL only type checks the bodies of methods with type signatures. Methods without type signatues, or code that is not in method bodies, is not checked.

The `type` method can also be called with the class and method to be annotated, and it can also be invoked as `RDL.type` in case `extend RDL::Annotate` would cause namespace issues:

```
  type :A, :id, '(Integer) -> Integer', typecheck: :label # Add a type annotation for A#id.
  RDL.type :A, :id, '(Integer) -> Integer', typecheck: :label # Note class and method name required when calling like this
```

RDL tries to follow the philosophy that you get what you pay for. Methods with type annotations can be checked dynamically or statically; methods without type annotations are unaffected by RDL. See the [performance](#performance) discussion for more detail.

RDL supports many more complex type annotations; see below for a complete discussion and examples.

RDL types are stored in memory at run time, so it's also possible for programs to query them. RDL includes lots of contracts and types for the core and standard libraries. Since those methods are generally trustworthy, RDL doesn't actually enforce the contracts (since that would add overhead), but they are available to search, query, and use during type checking. RDL includes a small script `rdl_query` to look up type information from the command line. Note you might need to put the argument in quotes depending on your shell.

```shell
$ rdl_query String#include?            # print type for instance method of another class
$ rdl_query Pathname.glob              # print type for singleton method of a class
$ rdl_query Array                      # print types for all methods of a class
$ rdl_query "(Integer) -> Integer"     # print all methods that take an Integer and return an Integer
$ rdl_query "(.) -> Integer"           # print all methods that take a single arg of any type
$ rdl_query "(..., Integer, ...) -> ." # print all methods that take an Integer as some argument

```

See below for more details of the query format. The `RDL.query` method performs the same function as long as the gem is loaded, so you can use this in `irb`.

```ruby
$ irb
> require 'rdl'
 => true
> require 'types/core'
 => true

> RDL.query '...' # as above
```

RDL also supports more general contracts, though these can only be enforced at run time and are not statically checked. These more general contracts take the form of *preconditions*, describing what a method assumes about its inputs, and *postconditions*, describing what a method guarantees about its outputs. For example:

```ruby
require 'rdl'
extend RDL::Annotate

pre { |x| x > 0 }
post { |r,x| r > 0 }
def sqrt(x)
  # return the square root of x
end
```

Given this program, RDL intercepts the call to `sqrt` and passes its argument to the `pre` block, which checks that the argument is positive. Then when `sqrt` returns, RDL passes the return value (as `r`) and the initial argument (as `x`) to the `post` block, which checks that the return is positive. (Let's ignore complex numbers to keep things simple...) RDL contracts are enforced at method entry and exit. For example, if we call `sqrt(49)`, RDL first checks that `49 > 0`; then it passes `49` to `sqrt`, which (presumably) returns `7`; then RDL checks that `7 > 0`; and finally it returns `7`. The `pre` and `post` methods can also be called as `RDL.pre` and `RDL.post`, as long as they are also given class and method arguments, similarly to `type`. Note that pre- and postconditions can't be searched for using `RDL.query`.

Note: RDL is a research project from the [Tufts University Computer Science Department](https://www.cs.tufts.edu) and the [University of Maryland, College Park Computer Science Department](https://www.cs.umd.edu). If you are looking for an industrial strength Ruby type system, check out Stripe's [Sorbet](https://sorbet.org) system.

# Using RDL

## Supported versions of Ruby

RDL currently supports Ruby 2.x except 2.1.1-2.1.6. RDL may or may not work with other versions.

## Installing RDL

`gem install rdl` should do it.

## Loading RDL

Use `require 'rdl'` to load the RDL library. If you want to access the annotation language, add `extend RDL::Annotate` as appropriate. If you want to use the core and standard library type signatures that come with RDL, follow it with `require 'types/core'`. Currently RDL has types for the following versions of Ruby:

* 2.x

## Disabling RDL

For performance reasons you probably don't want to use RDL in production code. To disable RDL, replace `require 'rdl'` with `require 'rdl_disable'`. This will cause all invocations of RDL methods to either be no-ops or to do the minimum necessary to preserve the program's semantics (e.g., if the RDL method returns `self`, then so does the `rdl_disable` method.)

## Rails

To add types to a Ruby on Rails application, add

```ruby
gem 'rdl'
```

to your `Gemfile` to get the latest stable version, or

```ruby
gem 'rdl', git: 'https://github.com/plum-umd/rdl'
```

to get the head version from github.

In development and test mode, you will now have access to `rdl`, `types/core` from RDL, and extra type annotations for Rails and some related gems. In production mode, RDL will be disabled (by loading `rdl_disable`).

**Warning:** Rails support is currently extremely limited, not well tested, and generally needs more work...please send bug reports/pull requests/etc and we will try to fix things.

## Preconditions and Postconditions

The `pre` method takes a block and adds that block as a precondition to a method. When it's time to check the precondition, the block will be called with the method's arguments. If the block returns `false` or `nil` the precondition is considered to have failed, and RDL will raise a `ContractError`. Otherwise, if the block returns a true value, then the method executes as usual. The block can also raise its own error if the contract fails.

The `pre` method can be called in several ways:

* `pre { block }` - Apply precondition to the next method to be defined
* `pre(mth) { block }` - Apply precondition to method `mth` of the current class, where `mth` is a `Symbol` or `String`
* `pre(cls, mth) { block }` - Apply precondition to method `mth` of class `cls`, where `cls` is a `Class`, `Symbol`, or `String`, and `mth` is a `Symbol` or `String`

The `post` method is similar, except its block is called with the return value of the method (in the first position) followed by all the method's arguments. For example, you probably noticed that for `sqrt` above the `post` block took the return value `r` and the method argument `x`.

(Note: RDL does *not* clone or dup the arguments at method entry. So, for example, if the method body has mutated fields stored inside those argument objects, the `post` block or any other check evaluated afterwards will see the mutated field values rather than the original values.)

The `post` method can be called in the same ways as `pre`.

Methods can have no contracts, `pre` by itself, `post` by itself, both, or multiple instances of either. If there are multiple contracts, RDL checks that *all* contracts are satisfied, in the order that the contracts were bound to the method.

Both `pre` and `post` accept an optional named argument `version` that takes a rubygems version requirement string or array of version requirement students. If the current Ruby version does not match the requirement, then the call to `pre` and `post` is ignored.

## Type Annotations

The `type` method adds a type contract to a method. It supports the same calling patterns as `pre` and `post`, except rather than a block, it takes a string argument describing the type. More specifically, `type` can be called as:

* `type 'typ'`
* `type m, 'typ'`
* `type cls, mth, 'typ'`

A type string generally has the form `(typ1, ..., typn) -> typ` indicating a method that takes `n` arguments of types `typ1` through `typn` and returns type `typ`. Below, to illustrate the various types RDL supports, we'll use examples from the core library type annotations.

The `type` method can be called with `wrap: false` so the type information is stored but the type is not enforced. For example, due to the way RDL is implemented, the method `String#=~` can't have a type or contract on it because then it won't set the correct `$1` etc variables:

```ruby
type :=~, '(Object) -> Integer or nil', wrap: false # Wrapping this messes up $1 etc
```

For consistency, `pre` and `post` can also be called with `wrap: false`, but this is generally not as useful.

The `type` method also accepts an optional `version` named argument.

# RDL Types

## Nominal Types

A nominal type is simply a class name, and it matches any object of that class or any subclass.

```ruby
type String, :insert, '(Integer, String) -> String'
```

## Nil Type

The nominal type `NilClass` can also be written as `nil`. The only object of this type is `nil`:

```ruby
type IO, :close, '() -> nil' # IO#close always returns nil
```

Currently, `nil` is treated as if it were an instance of any class.
```ruby
x = "foo"
x.insert(0, nil) # RDL does not report a type error
```
We chose this design based on prior experience with static type systems for Ruby, where not allowing this leads to a lot of false positive errors from the type system. However, we may change this in the future.

## Top Type (%any)

RDL includes a special "top" type `%any` that matches any object:
```ruby
type Object, :=~, '(%any) -> nil'
```
We call this the "top" type because it is the top of the subclassing hierarchy RDL uses. Note that `%any` is more general than `Object`, because not all classes inherit from `Object`, e.g., `BasicObject` does not.

## Dynamic Type (%dyn)

RDL has the dynamic type `%dyn` that is the subtype and supertype of any type.
```ruby
type Example, :method, '(%dyn) -> %dyn'
```
This is useful for typed portions of a Ruby program that interact with untyped portions. RDL allows setting a [configuration option](#configuration) `assume_dyn_type` to `true` so that any method that is missing a type will be assumed to take and return the dynamic type. By default, this option is set to `false`.

## Union Types

Many Ruby methods can take several different types of arguments or return different types of results. The union operator `or` can be used to indicate a position where multiple types are possible.

```ruby
type IO, :putc, '(Numeric or String) -> %any'
type String, :getbyte, '(Integer) -> Integer or nil'
```

Note that for `getbyte`, we could leave off the `nil`, but we include it to match the current documentation of this method.

## Intersection Types

Sometimes Ruby methods have several different type signatures. (In Java these would be called *overloaded* methods.) In RDL, such methods are assigned a set of type signatures:

```ruby
type String, :[], '(Integer) -> String or nil'
type String, :[], '(Integer, Integer) -> String or nil'
type String, :[], '(Range or Regexp) -> String or nil'
type String, :[], '(Regexp, Integer) -> String or nil'
type String, :[], '(Regexp, String) -> String or nil'
type String, :[], '(String) -> String or nil'
```

We say the method's type is the *intersection* of the types above.

When this method is called at run time, RDL checks that at least one type signature matches the call:

```ruby
"foo"[0]  # matches first type
"foo"[0,2] # matches second type
"foo"[0..2] # matches third type
"foo"[0, "bar"] # error, doesn't match any type
# etc
```

Notice that union types in arguments could also be written as intersection types of methods, e.g., instead of the third type of `[]` above we could have equivalently written

```ruby
type String, :[], '(Range) -> String or nil'
type String, :[], '(Regexp) -> String or nil'
```

## Optional Argument Types

Optional arguments are denoted in RDL by putting `?` in front of the argument's type. For example:

```ruby
type String, :chomp, '(?String) -> String'
```

This is actually just a shorthand for an equivalent intersection type:

```ruby
type String, :chomp, '() -> String'
type String, :chomp, '(String) -> String'
```

but it helps make types more readable.

Like Ruby, RDL allows optional arguments to appear anywhere in a method's type signature.

## Variable Length Argument Types

In RDL, `*` is used to decorate an argument that may appear zero or more times. Currently in RDL this annotation may only appear on the rightmost argument. For example, `String#delete` takes one or more `String` arguments:

```ruby
type String, :delete, '(String, *String) -> String'
```

## Named Argument Types

RDL allows arguments to be named, for documentation purposes. Names are given after the argument's type, and they do not affect type contract checking in any way. For example:

```ruby
type Integer, :to_s, '(?Integer base) -> String'
```

Here we've named the first argument of `to_s` as `base` to give some extra hint as to its meaning.

## Dependent Types

RDL allows for refinement predicates to be attached to named arguments. The predicates on the arguments are checked when the method is called, and the predicates on the return is checked when then method returns. For instance:

```ruby
type '(Float x {{ x>=0 }}) -> Float y {{ y>=0 }}'
def sqrt(x)
    # return the square root of x
end
```

Here, RDL will check that the `sqrt` method is called on an argument of type `Float` which is greater than or equal to 0, and it will check the same of the return value of the method. Note that, in effect, dependent type contracts can be used in place of pre and post contracts.

Dependencies can also exist across a method's arguments and return value:

```ruby
type '(Integer x {{ x>y }}, Integer y) -> Float z {{ z==(x+y) }}'
def m(x,y) ... end
```

Any arbitrary code can be placed between the double braces of a type refinement, and RDL will dynamically check that this predicate evaluates to true, or raise a type error if it evaluates to false.

Most pre- and postconditions can be translated into a dependent type by attaching the precondition to one of the arguments and the postcondition to the return. Note, however, that dependently typed positions must always have a name, even if the associated refinment doesn't refer to that name:

```ruby
type '(Integer x {{ $y > 0 }}) -> nil'    # argument name must be present even though refinment doesn't use it.
```

## Higher-order Types

RDL supports types for arguments or return values which are themselves `Proc` objects. Simply enclose the corresponding argument's type with braces to denote that it is a `Proc`. For example:

```ruby
type '(Integer, {(Integer) -> Integer}) -> Integer'
def m(x, y) ... end
```

The type annotation above states that the method m takes two arguments: one of type `Integer`, and another which is a `Proc` which itself takes an `Integer` and returns an `Integer`. A `Proc` may be the return value of a method as well:

```ruby
type '(Integer) -> {(Float) -> Float}'
def m(x) ... end
```

These higher-order types are checked by wrapping the corresponding `Proc` argument/return in a new `Proc` which checks that the type contract holds.

A type contract can be provided for a method block as well. The block's type should be included after the method argument types:

```ruby
type '(Integer, Float) {(Integer, String) -> String } -> Float'
def m(x,y,&blk) ... end
```

Note that this notation will work whether or not a method block is explicitly referenced in the parameters, i.e., whether or not `&blk` is included above. Finally, dependent types work across higher order contracts:

```ruby
type '(Integer x, Float y) -> {(Integer z {{ z>y }}) -> Integer}'
def m(x,y,&blk) ... end
```

The type contract above states that method `m` returns a `Proc` which takes an `Integer z` which must be greater than the argument `Float y`. Whenever this `Proc` is called, it will be checked that this contract holds.

## Class/Singleton Method Types

RDL method signatures can be used both for instance methods and for class methods (often called *singleton methods* in Ruby). To indicate a type signature applies to a singleton method, prefix the method name with `self.`:

```ruby
type File, 'self.dirname', '(String file) -> String dir'
```

(Notice also the use of a named return type, which we haven't seen before.)

## Structural Types

Some Ruby methods are intended to take any object that has certain methods. RDL uses *structural types* to denote such cases:

```ruby
type IO, :puts, '(*[to_s: () -> String]) -> nil'
```

Here `IO#puts` can take zero or more arguments, all of which must have a `to_s` method that takes no arguments and returns a `String`.

The actual checking that RDL does here varies depending on what type information is available. Suppose we call `puts(o)`. If `o` is an instance of a class that has a type signature `t` for `to_s`, then RDL will check that `t` is compatible with `() -> String`. On the other hand, if `o` is an instance of a class with no type signature for `to_s`, RDL only checks that `o` has a `to_s` method, but it doesn't check its argument or return types.

## Singleton Types

Not to be confused with types for singleton methods, RDL includes *singleton types* that denote positions that always have one particular value; this typically happens only in return positions. For example, `Dir#mkdir` always returns the value 0:

```ruby
type Dir, 'self.mkdir', '(String, ?Integer) -> 0'
```

In RDL, any integer or floating point number denotes a singleton type. Arbitrary values can be turned into singleton types by wrapping them in `${.}`. For example, `Float#angle` always returns 0 or pi.

```ruby
type Float, :angle, '() -> 0 or ${Math::PI}'
```

RDL checks if a value matches a singleton type using `equal?`. As a consequence, singleton string types aren't currently possible.

Note that the type `nil` is actually implemented as a singleton type with the special behavior that `nil` is a treated as a member of any class. However, while `nil` can in general be used anywhere any type is expected, it *cannot* be used where a different singleton type is expected. For example, `nil` could not be a return value of `Dir#mkdir` or `Float#angle`.

## Self Type

Consider a method that returns `self`:

```ruby
class A
  def id
    self
  end
end
```

If that method might be inherited, we can't just give it a nominal type, because it will return a different object type in a subclass:

```ruby
class B < A
end

type A, :id, '() -> A'
A.new.id # okay, returns an A
B.new.id # type error, returns a B
```

To solve this problem, RDL includes a special type `self` for this situation:

```ruby
type A, :id, '() -> self'
A.new.id # okay, returns self
B.new.id # also okay, returns self
```

Thus, the type `self` means "any object of self's class."

## Type Aliases

RDL allows types to be aliases to make them faster to write down and more readable. All type aliases begin with `%`. RDL has one built-in alias, `%bool`, which is shorthand for `TrueClass or FalseClass`:

```ruby
type String, :==, '(%any) -> %bool'
```

Note it is not a bug that `==` is typed to allow any object. Though you would think that developers would generally only compare objects of the same class (since otherwise `==` almost always returns false), in practice a lot of code does compare objects of different classes.

Method `type_alias(name, typ)` (part of `RDL::Annotate`) can be used to create a user-defined type alias, where `name` must begin with `%`:

```ruby
type_alias '%real', 'Integer or Float or Rational'
type_alias '%string', '[to_str: () -> String]'
type_alias '%path', '%string or Pathname'
```

Type aliases have to be created before they are used (so above, `%path` must be defined after `%string`).

## Generic Class Types

RDL supports *parametric polymorphism* for classes, a.k.a. *generics*. The `type_params` method (part of `RDL::Annotate`) names the type parameters of the class, and those parameters can then be used inside type signatures:

```ruby
class Array
  type_params [:t], :all?

  type :shift, '() -> t'
end
```

Here the first argument to `type_params` is a list of symbols or strings that name the type parameters. In this case there is one parameter, `t`, and it is the return type of `shift`. The `type_params` method accepts an optional first argument, the class whose type parameters to set (this defaults to `self`).

Generic types are applied to type arguments using `<...>` notation, e.g., `Array<Integer>` is an `Array` class where `t` is replaced by `Integer`. Thus, for example, if `o` is an `Array<Integer>`, then `o.shift` returns `Integer`. As another example, here is the type for the `[]` method of `Array`:

```ruby
type Array, :[], '(Range) -> Array<t>'
type Array, :[], '(Integer or Float) -> t'
type Array, :[], '(Integer, Integer) -> Array<t>'
```

Thus if `o` is again an `Array<Integer>`, then `o[0]` returns an `Integer` and `o[0..5]` returns an `Array<Integer>`.

In general it's impossible to assign generic types to objects without knowing the programmer's intention. For example, consider code as simple as `x = [1,2]`. Is it the programmer's intention that `x` is an `Array<Integer>`? `Array<Numeric>`? `Array<Object>`?

Thus, by default, even though `Array` is declared to take type parameters, by default RDL treats array objects at the *raw* type `Array`, which means the type parameters are ignored whenever they appear in types. For our example, this means a call such as `x.push("three")` would not be reported as an error (the type signature of `Array#push` is `'(?t) -> Array<t>'`).

To fully enforce generic types, RDL requires that the developer `RDL.instantiate!` an object with the desired type parameters:

```ruby
x = [1,2]
RDL.instantiate!(x, 'Integer')
x.push("three") # type error
```

Note that the instantiated type is associated with the object, not the variable:
```ruby
y = x
y.push("three") # also a type error
```

Calls to `RDL.instantiate!` may also come with a `check` flag. By default, `check` is set to false. When `check` is set to true, we ensure that the receiving object's contents are consistent with the given type *at the time of the call to* `RDL.instantiate!`. Currently this is enforced using the second parameter to `type_params`, which must name a method that behaves like `Array#all?`, i.e., it iterates through the contents, checking that a block argument is satisfied. As seen above, for `Array` we call `type_params(:t, :all?)`. Then at the call `x.instantiate('Integer', check: true)`, RDL will call `Array#all?` to iterate through the contents of `x` to check they have type `Integer`. A simple call to `RDL.instantiate!(x, 'Integer')`, on the other hand, will not check the types of the elements of `x`. The `check` flag thus leaves to the programmer this choice between dynamic type safety and performance.

RDL also includes a `RDL.deinstantiate!` method to remove the type instantiation from an object:
```ruby
RDL.deinstantiate!(x)
x.push("three") # no longer a type error
```

Finally, `type_params` can optionally take a third argument that is an array of *variances*, which are either `:+` for covariance, `:-` for contravariance, or `:~` for invariance. If variances aren't listed, type parameters are assumed to be invariant, which is a safe default.

Variances are only used when RDL checks that one type is a subtype of another. This only happens in limited circumstances, e.g., arrays of arrays where all levels have instantiated types. So generally you don't need to worry much about the variance.

The rules for variances are standard. Let's assume `A` is a subclass of `B`. Also assume there is a class `C` that has one type parameter. Then:
* `C<A>` is a subtype of `C<A>` always
* `C<A>` is a subtype of `C<B>` if `C`'s type parameter is covariant
* `C<B>` is a subtype of `C<A>` if `C`'s type parameter is contravariant

## Tuple Types

A type such as `Array<Integer>` is useful for homogeneous arrays, where all elements have the same type. But Ruby programs often use heterogeneous arrays, e.g., `[1, "two"]`. The best generic type we can give this is `Array<Integer or String>`, but that's imprecise.

RDL includes special *tuple types* to handle this situation. Tuple types are written `[t1, ..., tn]`, denoting an `Array` of `n` elements of types `t1` through `tn`, in that order. For example, `[1, "two"]` has type `[Integer, String]`. As another example, here is the type of `Process#getrlimit`, which returns a two-element array of `Integers`:

```ruby
type Process, 'self.getrlimit', '(Symbol or String or Integer resource) -> [Integer, Integer] cur_max_limit'
```

## Finite Hash Types

Similarly to tuple types, RDL also supports *finite hash types* for heterogeneous hashes. Finite hash types are written `{k1 => v1, ..., kn => vn}` to indicate a `Hash` with `n` mappings of type `ki` maps to `vi`. The `ki` may be strings, integers, floats, or constants denoted with `${.}`. If a key is a symbol, then the mapping should be written `ki: vi`. In the latter case, the `{}`'s can be left off:
```ruby
type MyClass, :foo, '(a: Integer, b: String) { () -> %any } -> %any'
```
Here `foo`, takes a hash where key `:a` is mapped to an `Integer` and key `:b` is mapped to a `String`. Similarly, `{'a'=>Integer, 2=>String}` types a hash where keys `'a'` and `2` are mapped to `Integer` and `String`, respectively. Both syntaxes can be used to define hash types.

Value types can also be declared as optional, indicating that the key/value pair is an optional part of the hash:
```ruby
type MyClass, :foo, '(a: Integer, b: ?String) { () -> %any } -> %any'
```
With this type, `foo` takes a hash where key `:a` is mapped to an `Integer`, and furthermore the hash may or may not include a key `:b` that is mapped to a `String`.

RDL also allows a "rest" type in finite hashes (of course, they're not so finite if they use it!):
```ruby
type MyClass, :foo, '(a: Integer, b: String, **Float) -> %any'
```
In this method, `a` is an `Integer`, `b` is a `String`, and any number (zero or more) remaining keyword arguments can be passed where the values have type `Float`, e.g., a call `foo(a: 3, b: 'b', pi: 3.14)` is allowed.

## Type Casts

Sometimes RDL does not have precise information about an object's type (this is most useful during static type checking). For these cases, RDL supports type casts of the form `RDL.type_cast(o, t)`. This call returns a new object that delegates all methods to `o` but that will be treated by RDL as if it had type `t`. If `force: true` is passed to `RDL.type_cast`, RDL will perform the cast without checking whether `o` is actually a member of the given type. For example, `x = RDL.type_cast('a', 'nil', force: true)` will make RDL treat `x` as if it had type `nil`, even though it's a `String`.

Similarly, if an object's type is parameterized (see [Generic Types](#generic-class-types) above), RDL might not statically know the correct instantiation of the object's type parameters. In this case, we can use `RDL.instantiate!` to provide the proper type parameter bindings. For instance, if `a` has type `Array`, but we want RDL to know that `a`'s elements are all `Integer`s or `String`s, we can call `RDL.instantiate!(a, 'Integer or String')`.

## Bottom Type (%bot)

RDL also includes a special *bottom* type `%bot` that is a subtype of any type, including any class and any singleton types. In static type checking, the type `%bot` is given to so-called *void value expressions*, which are `return`, `break`, `next`, `redo`, and `retry` (notice that these expressions perform jumps rather than producing a value, hence they can be treated as having an arbitrary type). No Ruby objects have type `%bot`.

## Non-null Type

Types can be prefixed with `!` to indicate the associated value is not `nil`. For example:

`type :x=, '(!Integer) -> !Integer'  # x's argument must not be nil`

**Warning:** This is simply *documentation* of non-nullness, and **is not checked** by the static type checker. The contract checker might or might not enforce non-nullness. (For those who are curious: RDL has this annotation because it seems useful for descriptive purposes. However, it's quite challenging to build a practical analysis that enforces non-nilness without reporting too many false positives.)

## Constructor Type

Type signatures can be added to constructors by giving a type signature for `initialize` (not for `new` or `self.new`). The return type for `initialize` must always be `self` or a [generic type](#generic-class-types) where the base is `self`:

```ruby
type :initialize, '(String, Fixnum) -> self'
```

# Static Type Checking

As mentioned in the introduction, calling `type` with `typecheck: sym` statically type checks the body of the annotated method body against the given signature when `RDL.do_typecheck sym` is called. Note that at this call, all methods whose `type` call is labeled with `sym` will be statically checked.

Additionally, `type` can be called with `typecheck: :call`, which will delay checking the method's type until the method is called. Currently these checks are not cached, so expect a big performance hit for using this feature. Finally, `type` can be called with `typecheck: :now` to check the method immediately after it is defined. This is probably only useful for demos.

To perform type checking, RDL needs source code, which it gets by parsing the file containing the to-be-typechecked method. Hence, static type checking does not work in `irb` since RDL has no way of getting the source. Typechecking does work in `pry` (this feature has only limited testing) as long as typechecking is delayed until after the method is defined:

```ruby
[2] pry(main)> require 'rdl'
[3] pry(main)> require 'types/core'
[4] pry(main)> type '() -> Integer', typecheck: :later    # note: typecheck: :now doesn't work in pry
[5] pry(main)> def f; 'haha'; end
[6] pry(main)> RDL.do_typecheck :later
RDL::Typecheck::StaticTypeError:
(string):2:3: error: got type `String' where return type `Integer' expected
(string):2:   'haha'
(string):2:   ^~~~~~
from .../typecheck.rb:158:in `error'
```

RDL currently uses the [parser Gem](https://github.com/whitequark/parser) to parse Ruby source code. (And RDL uses the parser gem's amazing diagnostic output facility to print type error messages.)

Next we discuss some special features of RDL's type system and some of its limitations.

## Types for Variables

In a standard type system, local variables have one type throughout a method or function body. For example, in C and Java, declaring `int x` means `x` can only be used as an integer. However, in Ruby, variables need not be declared before they are used. Thus, by default, RDL treats local variables *flow-sensitively*, meaning at each assignment to a local variable, the variable's type is replaced by the type of the right hand side. For example:

```ruby
x = 3       # Here `x` is a `Integer`
x = "three" # Now `x` is a `String`
```
(Note this is a slight fib, since after the first line, `x` will actually have the singleton type `3`. But we'll ignore this just to keep the discussion a bit simpler, especially since `3` is a subtype of `Integer`.)

After conditionals, variables have the union of the types they have along both branches:

```ruby
if (some condition) then x = 3 else x = "three" end
# x has type `Integer or String`
```

RDL also provides a method `RDL.var_type` that can be used to force a local variable to have a single type through a method body, i.e., to treat it *flow-insensitively* like a standard type system:

```ruby
RDL.var_type :x, 'Integer'
x = 3       # okay
x = "three" # type error
```

The first argument to `RDL.var_type` is a symbol with the local variable name, and the second argument is a string containing the variable's type. Note that `RDL.var_type` is most useful at the beginning of method or code block. Using it elsewhere may result in surprising error messages, since RDL requires variables with fixed types to have the same type along all paths. Method parameters are treated as if `RDL.var_type` was called on them at the beginning of the method, fixing them to their declared type. This design choice may be revisited in the future.

There is one subtlety for local variables and code blocks. Consider the following code:
```ruby
x = 1
m() { x = 'bar' }
# what is x's type here?
```
If `m` invokes the code block, `x` will be a `String` after the call. Otherwise `x` will be `1`. Since RDL can't tell whether the code block is ever called, it assigns `x` type `1 or String`. It's actually quite tricky to do very precise reasoning about code blocks. For example, `m` could (pathologically) store its block in a global variable and then only call it the second time `m` is invoked. To keep its reasoning simple, RDL treats any local variables captured (i.e., imported from an outer scope) by a code block flow-insensitively for the lifetime of the method. The type of any such local variable is the union of all types that are ever assigned to it.

RDL always treats instance, class, and global variables flow-insensitively, hence their types must be defined with `var_type`. In this case, `var_type` can optionally be accessed without the `RDL` prefix by adding in the annotation syntax:

```ruby
class A
  extend RDL::Annotate
  var_type :@f, 'Integer'
  def m
    @f = 3       # type safe
    @f = "three" # type error, incompatible type in assignment
    @g = 42      # type error, no var_type for @g
  end
end
```

The `var_type` method may also be called as `var_type klass, :name, typ` to assign a type to an instance or class variable of class `klass`.

As a short-hand, RDL defines methods `attr_accessor_type`, `attr_reader_type`, and `attr_writer_type` (also part of `RDL::Annotate`) to behave like their corresponding non-`_type` analogs but  assign types to the attributes. For example, `attr_accessor_type :f, 'Integer', :g, 'String'` is equivalent to:

```ruby
var_type :@f, 'Integer'
var_type :@g, 'String'
type :f, '() -> Integer'
type :f=, '(Integer) -> Integer'
type :g, '() -> String'
type :g=, '(String) -> String'
```

## Tuples, Finite Hashes, and Subtyping

When RDL encounters a literal array in the program, it assigns it a tuple type, which allows, among other things, precise handling of multiple assignment. For example:

```ruby
x = [1, 'foo']  # x has type [1, String]
a, b = x        # a has type 1, b has type String
```

RDL also allows a tuple `[t1, ..., tn]` to be used where `Array<t1 or ... or tn>` is expected. This means both when a tuple is passed to an `Array` position, and when any method is invoked on the tuple (even if RDL could safely apply that method to the tuple; this may change in the future):

```ruby
var_type @f, 'Array<Integer or String>'
@f = [1, 'foo'] # okay
@f.length       # also okay
```

To maintain soundness, a tuple that is used as an `Array` is treated as if it were always an array. For example:

```ruby
x = [1, 'foo']  # at this point, x has type [1, String]
var_type @f, '[1, String]'
@f = x          # okay so far
var_type @g, 'Array<Integer or String>'
@g = x          # uh oh
```

When RDL encounters the assignment to `@g`, it retroactively changes `x` to have type `Array<Integer or String>`, which is incompatible with type `[1, String]` of `@f`, so the assignment to `@g` signals an error.

RDL uses the same approach for hashes: hash literals are treated as finite hashes. A finite hash `{k1=>v1, ..., kn=>vn}` can be used where `Hash<k1 or ... or kn, v1 or ... or vn>` is expected. And if a finite hash is used as a `Hash` (including invoking methods on the finite hash; this may change in the future), then it is retroactively converted to a `Hash`.

## Other Features and Limitations

*Displaying types.* As an aid to debugging, the method `RDL.note_type e` will display the type of `e` during type checking. At run time, this method returns its argument. Note that in certain cases RDL may type check the same code repeatedly, in which case an expression's type could be printed multiple times.

* *Conditional guards and singletons.* If an `if` or `unless` guard has a singleton type, RDL will typecheck both branches but not include types from the unrealizable branch in the expression type. For example, `if true then 1 else 'two' end` has type `1`. RDL behaves similarly for `&&` and `||`. However, RDL does not implement this logic for `case`.

* *Case analysis by class.* If the guard of a `case` statement is a variable, and then `when` branches compare against classes, RDL refines the type of the guard to be those classes within the corresponding `when` branch. For example, in `case x when Integer ...(1)... when String ...(2)... end`, RDL will assume `x` is an `Integer` within `(1)` and a `String` within `(2)`.

* *Multiple Assignment and nil.* In Ruby, extra left-hand sides of multiple assignments are set to `nil`, e.g., `x, y = [1]` sets `x` to `1` and `y` to `nil`. However, RDL reports an error in this case; this may change in the future.

* *Block formal arguments.* Similarly, RDL reports an error if a block is called with the wrong number of arguments even though Ruby does not signal an error in this case.

* *Caching.* If `typecheck: :call` is specified on a method, Ruby will type check the method every time it is called. In the future, RDL will cache these checks.

* *Dependent Types.* RDL ignores refinements in checking code with dependent types. E.g., given an `Integer x {{ x > 0 }}`, RDL will simply treat `x` as an `Integer` and ignore the requirement that it be positive.

* *Unsupported Features.* There are several features of Ruby that are currently not handled by RDL. Here is a non-exhaustive list:
  * `super` is not supported.
  * `lambda` has special semantics for `return`; this is not supported. Stabby lambda is also not supported.
  * Only simple `for` iteration variables are supported.
  * Control flow for exceptions is not analyzed fully soundly; some things are not reported as possibly `nil` that could be.
  * Only simple usage of constants is handled.

## Assumptions

RDL's static type checker makes some assumptions that should hold unless your Ruby code is doing something highly unusual. RDL assumes:

* `Class#===` is not redefined
* `Proc#call` is not redefined
* `Object#class` is not redefined

(More assumptions will be added here as they are added to RDL...)

# Type-Level Computations

RDL includes support for type-level computations: embedding Ruby code *within* a method's type signature. Using these type-level computations, we can write type signatures that can check more expressive properties, such as the correctness of column names and types in a database query. We have found that type-level computations significantly reduce the need for manually inserted type casts. Below we will cover the basics of using type-level computations. For a closer look, check out our [paper](https://www.cs.tufts.edu/~jfoster/papers/pldi19.pdf) on the same topic.

We use type-level computations only in type signatures for methods which themselves are *not* type checked. Thus, our primary focus is on applying them to library methods. We add a computation to a type by writing Ruby code, delimited by double backticks \`\`...\`\`, in place of a type within a method's signature. This Ruby code may refer to two special variables: `trec`, which names the RDL type of the receiver for a given method call, and `targs`, which names an array of RDL types of the arguments for a given method call. The code must itself evaluate to a type.

As an example, we will write a type-level computation for the `Integer#+` method. Normaly, this method would have the simple RDL type `type '(Integer) -> Integer'` (for the case that it takes another `Integer`). Using type level computations, we can write the following more precise type:

```ruby
type '(Integer) -> ``if trec.is_a?(RDL::Type::SingletonType) && targs[0].is_a?(RDL::Type::SingletonType) then RDL::Type::SingletonType.new(trec.val+targs[0].val) else RDL::Type::NominalType.new(Integer) end``'
```

Now, in place of a simple return type, we have written some Ruby code. This code checks if both the receiver (`trec`) and argument (`targs[0]`) have a singleton type. If so, in the first arm of the branch we compute a new singleton type containing the sum of the receiver and argument. Otherwise, we fall back on returning the nominal type `Integer`. With this signature, RDL can determine the expression `1+2` has the type `3`, rather than the less precise type `Integer`.

We also provide a way of binding variable names to argument types, to avoid using the variable `targs`. For example, for the type signature above, we can give the argument type the name `t`, which we then refer to in the type-level computation:

```ruby
type '(Integer) -> ``if trec.is_a?(RDL::Type::SingletonType) && t.is_a?(RDL::Type::SingletonType) then RDL::Type::SingletonType.new(trec.val+t.val) else RDL::Type::NominalType.new(Integer) end``'
```

We have written type-level computations for methods from the Integer, Float, Array, Hash, and String core libraries, which you can find  in the `/lib/types/core/` directory. We have also written them for a number of database query methods from both the [ActiveRecord](https://github.com/rails/rails/tree/master/activerecord) and [Sequel](https://github.com/jeremyevans/sequel) DSLs. They can be found in `comp_types.rb` file in the `/lib/types/rails/active_record` and `/lib/types/sequel` directories, respectively. These type-level computations for the database query methods depend on RDL pre-processing the schema of the database before type checking any user code. RDL provides helper methods to process the database schema:

```ruby
RDL.load_sequel_schema(DATABASE) # `DATABASE` is the Sequel Database object

RDL.load_rails_schema # Automatically triggered if RDL is loaded in a Rails environment. If you want to use ActiveRecord without Rails, you need to call this method
```

Because type-level computations are used for methods which themselves are not type checked, we include an optional configuration for inserting dynamic checks that ensure that these methods return values of the type expected by their type-level computation. Additionally, because type-level computations can refer to mutable state, we include a second configuration for re-running type-level computations at runtime to ensure that they evaluate to the same value they did at type checking time. Both of these configurations are by default turned off. See the [Configuration](#configuration) section for information on turning them on.

# RDL Method Reference

The following methods are available in `RDL::Annotate`.

* `pre [klass], [meth], &blk, wrap: true, version: nil` - add `blk` as a precondition contract on `klass#meth`. If `klass` is omitted, applies to `self`. If `meth` is also omitted, applies to next defined method. If `wrap` is true, wrap the method to actually check the precondition. If it's false, don't wrap the method (this is probably useless). If a `version` string or array of strings is specified (in rubygems format), only apply when the current Ruby version matches.

* `post [klass], [meth], &blk, wrap: true, version: nil` - same as `pre`, but add a postcondition.

* `type [klass], [meth], typ, wrap: true, typecheck: nil, version: nil` - same as `pre`, but add a type specification. If `typecheck` is `nil`, does no static type checking. If it's `:call`, will type check the method each time it's called. If it's `:now`, will type check the method after it's defined. If it's some other `symbol`, will type check the method when `RDL.do_typecheck symbol` is called.

* `var_type [klass], var, typ` - indicate the `typ` is the type for `var`, which may be a `:@field` or `:local_variable`.

* `attr_accessor_type :name1, typ1, ...` calls `attr_accessor :name1, ...` and creates type annotations for the given field and its getters and setters.

* `attr_reader_type`, `attr_type`, and `attr_writer_type` - analogous to `attr_accessor_type`

* `rdl_alias [klass], new_name, old_name` tells RDL that method `new_name` of `klass` is an alias for method `old_name` (of the same class), and therefore they should have the same contracts and types. This method is only needed when adding contracts and types to method that have already been aliased; it's not needed if the method is aliased after the contract or type has been added. If the `klass` argument is omitted it's assumed to be `self`.

* `type_params [klass] [:param1, ...], :all, variance: nil, [&blk]` - indicates that `klass` should be treated as a generic type with parameters `:param1...`. The `:all` argument names a method of `klass` that iterates through a `klass` instance's contents. Alternatively, if a block is passed as an argument, that block is used as the iterator. The `variance` argument gives an array of variances of the parameters, `:+` for covariant, `:-` for contravaraiant, and `:~` for invariant. If `variance` is omitted, the parameters are assumed to be invariant.

The methods above can also be accessed as `rdl_method` after `extend RDL::RDLAnnotate`. They can also be accessed as `RDL.method`, but when doing so, however, the `klass` and `meth` arguments are not optional and must be specified. The `RDL` module also includes several other useful methods:

* `RDL.at(sym, &blk)` invokes `blk.call(sym)` when `RDL.do_typecheck(sym)` is called. Useful when type annotations need to be generated at some later time, e.g., because not all classes are loaded.

* `RDL.deinsantiate!(var)` - remove `var`'s instantiation.

* `RDL.do_typecheck(sym)` statically type checks all methods whose type annotations include argument `typecheck: sym`.

* `RDL.insantiate!(var, typ1, ...)` - `var` must have a generic type. Instantiates the type of `x` with type parameters `typ1`, ...

* `RDL.note_type e` - evaluates `e` and returns it at run time. During static type checking, prints out the type of `e`.

* `RDL.nowrap [klass]`, if called at the top-level of a class, causes RDL to behave as if `wrap: false` were passed to all `type`, `pre`, and `post` calls in `klass`. This is mostly used for the core and standard libraries, which have trustworthy behavior hence enforcing their types and contracts is not worth the overhead. If `klass` is omitted it's assumed to be `self`.

* `RDL.query` prints information about types; see below for details.

* `RDL.remove_type klass, meth` removes the type annotation for meth in klass. Fails if meth does not have a type annotation.

* `RDL.reset` resets all global state stored internally inside RDL back to their original settings. Note: this is really only for internal RDL testing, as it doesn't completely undo RDL's effect (e.g., wrapped methods will be broken by a reset).

* `RDL.type_alias '%name', typ` - indicates that if `%name` appears in a type annotations, it should be expanded to `typ`.

* `RDL.type_cast(e, typ, force: false)` - evaluate `e` and return it at run time. During dynamic contract checking, the returned object will have `typ` associated with it. If `force` is `false`, will also check that `e`'s run-time type is compatible with `typ`. If `force` is true then `typ` will be applied regardless of `e`'s type. During static type checking, the type checker will treat the object returned by `type_cast` has having type `typ`.

# Performance

RDL supports some tradeoffs between safety and performance. There are three main sources of overhead in using RDL:

* When a method is wrapped by RDL, invoking it is more expensive because it requires calling the wrapper which then calls the underlying method. This is the most significant run-time cost of using RDL, and it can be eliminated by adding `wrap: false` to an annotation. (But, this only makes sense for types, since those are the only annotations that can be statically checked.)

* When type checking is performed, RDL parses the program's source code and type checks method bodies. This source of overhead only happens once per method (unless `typecheck: :call` is used), so the overhead is probably not too bad (though we have not measured it).

* RDL adds an implementation of `method_added` and `singleton_method_added` to carry out some of its work, and those are called on every method addition. This source of overhead is again likely not too significant.

For uses of `pre` and `post`, there's not a lot of choice: those contracts are enforced at run-time and will incur the costs of wrapped methods. However, note that any methods that are not annotated with `pre` or `post` will not incur the cost of wrapping. (Similarly, methods not annotated with `type` never incur any wrapping cost.)

For uses of `type`, there are more choices, which can be split into two main use cases. First, suppose there's a method `m` that we want a type for but don't want to type check (for example, it may come from some external library). So suppose we read the documentation and give `m` type `(Integer) -> Integer`. We now have to decide whether to wrap `m`. If we don't wrap `m`, then we incur no overhead on calls to `m`, but we are trusting the type. If we do wrap `m`, then on every call to it RDL will check that we call it with an `Integer` and it actually returns an `Integer`. So if we're not completely sure of `m`'s type, it might be useful to wrap it and then run test cases against it to see if the type annotation is every violated. (For example, the RDL developers did this to test out many of the core library annotations in RDL.)

Second, suppose there's a method `m` that we do want to type check, and again `m` has type `(Integer) -> Integer`. Now RDL will use type checking to ensure that if `m` is given an `Integer` then it returns `Integer`. But now we again have to decide whether to wrap `m`. If we don't wrap `m`, then we get the most efficiency, since typechecking (assuming we do not do it at calls) will only happen once and calls will incur no overhead. On the other hand, it could be that some non-typechecked code calls `m` with something that's not an `Integer`, in which case `m` might do anything, including report a type error. (Notice the type checking of `m` assumed its input was an `Integer`, and it doesn't say anything about the case when its argument is not.) To protect against this case, we can wrap `m`. Then if a caller violates `m`'s type, we'll get an error in the caller code when it tries to call `m`.

(Side note: If typed methods are wrapped, then their type contracts are checked at run time for *all* callers, including ones that are were statically type checked and hence couldn't call methods at incorrect types. A future version of RDL will fix this, but it will require some significant changes to RDL's implementation strategy.)

# Queries

As discussed above, RDL includes a small script, `rdl_query`, to look up type information. (Currently it does not support other pre- and postconditions.) The script takes a single argument, which should be a string. Note that when using the shell script, you may need to use quotes depending on your shell. Currently several queries are supported:

* Instance methods can be looked up as `Class#method`.

```shell
$ rdl_query String#include?
String#include?: (String) -> TrueClass or FalseClass
```

* Singleton (class) methods can be looked up as `Class.method`.

```shell
$ rdl_query Pathname.glob
Pathname.glob: (String p1, ?String p2) -> Array<Pathname>
```

* All methods of a class can be listed by passing the class name `Class`.

```shell
$ rdl_query Array
&: (Array<u>) -> Array<t>
*: (String) -> String
... and a lot more
```

* Methods can also be search for by their type signature:

```shell
$ rdl_query "(Integer) -> Integer"      # print all methods of type (Integer) -> Integer
BigDecimal.limit: (Integer) -> Integer
Dir#pos=: (Integer) -> Integer
... and a lot more
```

The type signature uses the standard RDL syntax, with two extensions: `.` can be used as a wildcard to match any type, and `...` can be used to match any sequence of arguments.

```shell
$ rdl_query "(.) -> ."                 # methods that take one argument and return anything
$ rdl_query "(Integer, .) -> ."        # methods that take two arguments, the first of which is an Integer
$ rdl_query "(Integer, ...) -> ."      # methods whose first argument is an Integer
$ rdl_query "(..., Integer) -> ."      # methods whose last argument is an Integer
$ rdl_query "(..., Integer, ...) -> ." # methods that take an Integer somewhere
$ rdl_query "(Integer or .) -> ."      # methods that take a single argument that is a union containing an Integer
$ rdl_query "(.?) -> ."                # methods that take one, optional argument
```

Note that aside from `.` and `...`, the matching is exact. For example `(Integer) -> Integer` will not match a method of type `(Integer or String) -> Integer`.

# Configuration

To configure RDL, execute the following shortly after RDL is loaded:

```ruby
RDL.config { |config|
  # use config to configure RDL here
}
```

RDL supports the following configuration options:

* `config.nowrap` - `Array<Class>` containing all classes whose methods should not be wrapped.
* `config.gather_stats` - currently disabled.
* `config.report` - if true, then when the program exits, RDL will print out a list of methods that were statically type checked, and methods that were annotated to be statically type checked but weren't.
* `config.guess_types` - List of classes (of type `Array<Symbol>`). For every method added to a listed class *after* this configuration option is set, RDL will record the types of its arguments and returns at run-time. Then when the program exits, RDL will print out a skeleton for each class with types for the monitored methods based on what RDL recorded at run-time and based on what Ruby knows about the methods' signatures. This is probably not going to produce the correct method types, but it might be a good starting place.
* `config.type_defaults` - Hash containing default options for `type`. Initially `{ wrap: true, typecheck: false }`.
* `config.pre_defaults` - Hash containing default options for `pre`. Initially `{ wrap: true }`.
* `config.post_defaults` - same as `pre_defaults`, but for `post`.
* `config.use_comp_types` - when true, RDL makes use of types with type-level computations. When false, RDL ignores such types. By default set to true.
* `config.check_comp_types` - when true, RDL inserts dynamic checks which ensure that methods with type-level computations will return the expected type. False by default.
* `config.rerun_comp_types` - when true, RDL inserts dynamic checks which rerun type-level computations at method call sites, ensuring that they evaluate to the same type they did at type checking time.  False by default.

# Bibliography

Here are some research papers we have written exploring types, contracts, and Ruby.

* Milod Kazerounian, Sankha Narayan Guria, Niki Vazou, Jeffrey S. Foster, and David Van Horn.
[Type-Level Computations for Ruby Libraries](https://www.cs.tufts.edu/~jfoster/papers/pldi19.pdf).
In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), Phoenix, AZ, June 2019.

* Brianna M. Ren and Jeffrey S. Foster.
[Just-in-Time Static Type Checking for Dynamic Languages](http://www.cs.tufts.edu/~jfoster/papers/pldi16.pdf).
In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), Santa Barbara, CA, June 2016.

* T. Stephen Strickland, Brianna Ren, and Jeffrey S. Foster.
[Contracts for Domain-Specific Languages in Ruby](http://www.cs.tufts.edu/~jfoster/papers/dls12.pdf).
In Dynamic Languages Symposium (DLS), Portland, OR, October 2014.

* Brianna M. Ren, John Toman, T. Stephen Strickland, and Jeffrey S. Foster.
[The Ruby Type Checker](http://www.cs.tufts.edu/~jfoster/papers/oops13.pdf).
In Object-Oriented Program Languages and Systems (OOPS) Track at ACM Symposium on Applied Computing, pages 1565–1572, Coimbra, Portugal, March 2013.

* Jong-hoon (David) An, Avik Chaudhuri, Jeffrey S. Foster, and Michael Hicks.
[Dynamic Inference of Static Types for Ruby](http://www.cs.tufts.edu/~jfoster/papers/popl11.pdf).
In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), pages 459–472, Austin, TX, USA, January 2011.

* Jong-hoon (David) An.
[Dynamic Inference of Static Types for Ruby](http://www.cs.tufts.edu/~jfoster/papers/thesis-an.pdf).
MS thesis, University of Maryland, College Park, 2010.

* Michael Furr.
[Combining Static and Dynamic Typing in Ruby](https://www.cs.tufts.edu/~jfoster/papers/thesis-furr.pdf).
PhD thesis, University of Maryland, College Park, 2009.

* Michael Furr, Jong-hoon (David) An, Jeffrey S. Foster, and Michael Hicks.
[The Ruby Intermediate Langauge](http://www.cs.tufts.edu/~jfoster/papers/dls09-ril.pdf).
In Dynamic Languages Symposium (DLS), pages 89–98, Orlando, Florida, October 2009.

* Michael Furr, Jong-hoon (David) An, and Jeffrey S. Foster.
[Profile-Guided Static Typing for Dynamic Scripting Languages](http://www.cs.tufts.edu/~jfoster/papers/oopsla09.pdf).
In ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), pages 283–300, Orlando, Floria, October 2009. Best student paper award.

* Michael Furr, Jong-hoon (David) An, Jeffrey S. Foster, and Michael Hicks.
[Static Type Inference for Ruby](http://www.cs.tufts.edu/~jfoster/papers/oops09.pdf).
In Object-Oriented Program Languages and Systems (OOPS) Track at ACM Symposium on Applied Computing (SAC), pages 1859–1866, Honolulu, Hawaii, March 2009.

# Copyright

Copyright (c) 2014-2017, University of Maryland, College Park. All rights reserved.

# Contributing

Contributions are welcome! If you submit any pull requests, please
submit them against the `dev` branch. We keep the `master` branch so
it matches the latest gem version.

# Authors

* [Jeffrey S. Foster](http://www.cs.tufts.edu/~jfoster/)
* [Brianna M. Ren](https://www.cs.umd.edu/~bren/)
* [T. Stephen Strickland](https://www.cs.umd.edu/~sstrickl/)
* Alexander T. Yu
* Milod Kazerounian
* [Sankha Narayan Guria](https://sankhs.com/)

# Contributors

* [Joel Holdbrooks](https://github.com/noprompt)
* [Paul Tarjan](https://github.com/ptarjan)

# Discussion group

[RDL Users](https://groups.google.com/forum/#!forum/rdl-users)

redpajama_set_name: RedPajamaGithub


I picked out a color for the living room and kitchen. Everyone has been saying we need a bolder color in those areas. Since they open into each other, I am just going to use the same color for both.
Anyway, DH is working this weekend, so I told him if he helps tape it off on Friday night, I will paint what I can on Saturday. He left the color in my hands, I sooooo hope it looks good! Most of my picture frames and accents are gold colored, my couches are beige/light tan in color and we have the wood fireplace and tables.
The living room is pretty open, not huge but big enough. It has the stairs going up also so it give that a more open look. The kitchen has one of those real big cutouts for the door.
I like it a lot! It looks a lot like the color we used in the hallway going downstairs from the kitchen. It is pretty dark on the walls though, jfyi.
I think it will look great in those rooms They are really open and can support a bold color Can't wait to see it .. need to crop and come see it!!
I really like that color! Can't wait to see the pics!
I think it'll look good. However, if you don't like it it's just paint and can always be changed.
I will take before and after pictures. I am excited though. I have a ton of gold picture frame collages and such that have just been sitting around with no pictures that I want to get hung up and we have been wanting to paint for so long that I just haven't done anything. So after I get it all done, I get to work on picking out pics to put in them and we have a ton of professional pictures still in their sleeves to get up that I want to put up the hall.


Maintain in thoughts that condition is quite essential to the value of vintage furniture. A piece that is in much less than mint situation is still cool, but you ought to be in a position to get it at a substantially decrease cost.
Folks who want to get into estate sales usually jump in envisioning the thrill of hunting through Granny's antiques or obtaining some heirloom that has been in the household for generations for a ridiculously low cost. They take pleasure in the history that a piece has and the thrill of potentially discovering a uncommon antique that hasn't observed the light of day. Of course, in reality, this is not common—but what keeps people going back to a single sale after one more is the possibility of that extraordinary find.
Hi. I want I would have located this sooner! I just completed painting my fake wood television stand with BEHR 'stain blocking & primer in one'(on the tips of somebody else) but am nevertheless concerned with it scratching off. I am going to do what you did and put the varathane on now but wanted to know how you applied it. Brush or roller. and any other valuable hints even though doing it? Thanks!
I'm 18 and I'm arranging on repainting my bedroom dresser and nightable by myself. I've had them considering that I was 7 and I'm bored of them, but I never want to commit a entire lot on new furniture. My furniture is kind of like an old white/bone colour, and I want them to match with the vibrant white of a desk I bought not too long ago.
What is its age? Unless you have a proof of acquire, age can be a tough a single to establish because there are sellers who unknowingly do ungodly things like polish a piece of jewelry to make it look shiny for sale. Patina can give a clue that may possibly aid you figure out if a piece is the genuine deal. Also, beware that products can be artificially oxidized with some quite easy chemicals that are readily available to appear older than they are. Appear for indicators of regular wear that a piece of jewelry may well naturally have, such as exactly where a wrist watch may well have speak to against a difficult surface, etc.


The Association since its founding works on the recognition of rights and services for persons with disabilities in general and for the visually handicapped in particular. This was done through demands for movements taking different forms and at different levels.
YAB, within its awareness raising, works on capacity building of its advocates weather individuals or associations helping them organize themselves. YAB also works on sensitization of various sectors of society and its institutions. We count the alliance with the human rights associations and associations working in the field of disability to achieve common goals.
- Report of the National Conference on Social Inclusion.
- Final press release of Integration of Disability issues Project in the recovery and reconstruction plans.
- " My right Campaign" :Youth Association of the Blind and Lebanese handicapped Union have organized the campaign " My Right" since 2005 to activate the role of the disabled in politics and facilitate their participation in elections.
o Establishment of the Federation of Associations for the Blind.
o This is in addition to the committee "Support for inclusion Issue" : YAB coordinates this committee that was established as part of the National Inclusion Project.


A while ago I posted a question about joining a quilting quild because I did not know any quilters in my area. I bit the bullet and joined. Thank you all for nudging me in the right direction. A QB member sent me a pm regarding my quilt guild. We met for a quick cup of coffee which turned into three hours of chi-chat. She ended up joining the same guild and we both decided to leave our kids in capable hands of our DHs and go with our guild to a quilting retreat to Shelter Island. Who would have thought that one simple question on QB would have resulted in a new friendship, meeting a whole group of quilters and having so much fun. Cannot wait for my retreat...it is in March!
How awesome that you have found such a great new friendship because of a post you made here...I hope you have many, many years of quilting together! And enjoy your retreat!
That's wonderful! I'm so glad that you found a new friend and got to join a guild - and go on a retreat! I was in the same boat as you. I live in a town with a large quilt guild however I went to a meeting and did not feel welcomed... at all. I started my own guild and there are a group of active members that get together at least once month, maybe more to sew together. It's wonderful - and several of the ladies I'm beginning to start good friendships with. It's nice having friends with the same interests as you!
Tashana, it's nice to hear a story like yours. It gives me hope. Two friends and I had the same experience as 'yarn of fabric' at a local quilt guild. Although I haven't started one of my own, I'd still like to be a member of one. Unfortunately I'll have to go outside of my own town of Perinton. Maybe some day, I'll be able to say the same as you Tashana! Have a happy Thanksgiving Day!
Doin the Happy Dance for you both!
Good for you both. I know my guild changed my life too.
I took a chance and went to a retreat in another state. They were so welcoming that I go every year. It is all about taking that first step.
When the internet sort of took off, I asked on a bulletin board if anyone in England wanted to talk about quilting or get together when we were there on vacation. A wonderful woman answered and we have had a now 20+ year friendship. Quilting gives such an immediate common interest and quilters are great people.
I could not agree more Tashana. I am semi-retired and found after I stopped working and traveling in my job that I had few friends in the small town we live in. So, I joined a guild and have not looked back since. I have made new friends, went to quilt camp twice, will be going to snow camp in January and made new friends.
Oh yeah, I have learned so much from them and I recently became a board member.
I thank God every day for leading me in that direction.
I have not joined our local quilt guild but I am going on their retreat in January. Can't wait. Maybe that will motivate me to join the guild.
What a blessing it is to meet someone as you did! Oh, you both will have a fun time! Where is Shelter Island located? It was hard to find quilter friends even though I did take quilting classes. I finally joined a quilt guild, and my life has been enriched by such neat friends since then. I am on the board, too, as the treasurer, and I will serve a second term next year, too. Quilt retreats rock! I've gone a couple times.
So glad you were able to join the guild but more importantly, that you have found a new friend. I am retired and have found it difficult to make new friends--they have their circle already. I am an active member of the guild, tho, so that helps a lot.
That is why we love our QB and share with all our quilting friends. Quilters make the best friends.
As an old friend used to say" Squeaky wheel gets the grease!" good on both of you. You'll have a blast at the retreat!
I'm so happy for you!!! I wish I had a quilting buddy. I think that's the best part of your story...you made a new quilting friend. And one on our board. I wish someone from this board lived by me. I live in Cove, Oregon in case there is someone who lives close by and wants to meet up with me for coffee and gabbing. I live by LaGrande, Baker City, and Pendleton, Oregon. Anyone out there live by me???? If so, PM me please!
Shelter Island is located in NY state, east of Long Island. It looks like it could be a part of LI but you do need a ferry to go to Shelter Island. I think our guild will have open sign up for the retreat as of January if there any spots left. It is two nights, three days with five meals. I have not been to Shelter Island before but everybody says that the scenery is to die for. The retreat will be in Quinippet, right on the beach.
Last edited by Tashana; 11-23-2012 at 12:30 PM.
Sounds wonderful! How would it work with transporting your sewing machine/notions/projects on the ferry? Oh, a tip for you...I did it right the first time, too. Do bring more than one project (I brought four or five in different stages and finished one of them) because if you don't switch back and forth between projects, you will get sleepy...guaranteed, lol. This year I brought blocks to piece for three different quilts of valor (finished them off at home), stitched pieced wedges together for two spiral runners, etc. Both the retreats were at a dude ranch up in the mountains..great views, and the meals were beautifully prepared, and I had my own room with bath. The price was very, very low because it was off season. On the way home, my carpool buddy and I stopped at a quilt store, .
All of these quilting retreats sound great. Wish I had more time.......or should I say more of MY time. I am retired but feel I need to spend 3/4 of my time with retired hubby and 1/4 for me. He would disagree but I think he truly doesn't. As a group from my LQS, we all went to a friends rental and had a blast. I would love to think about Shutter Island, or California, etc. Ah, someday!
Since I live on LOng Island I will just take my car and load it with everything I need, and than some. We have a small truck and a minivan so which ever I take there will be plenty of room for my toys. LOL. I'll probably take the truck and leave the van to my hubby who will be taking care of the little ones. I have a pattern that I am keeping for the retreat, I will cut it and be ready to go. I am sure I will have a few UFOs by March that will keep me entertained. I can't wait.
Tashana..YOur avatar is the smile of the day for me..Love the little one. Is that a toothbrush???
There is NOTHING better than quilting with friends!!
Quilttiger are you part of a guild? I am in Denver and quilt alone. I moved here from the east coast and miss my quilting buddies terribly!
How great is that? Wonderful story!
How wonderful for both of you!!! When I read that your retreat was on Shelter Island it was like an old friends name. I met my husband there in 1980 and have been married ever since.
Hello Judi! I belong to Adams County Quilters since I live in Thornton, about 15 miles north of Denver. If you Goggle the words, quilt guilds in Denver, CO, a website from Colorado Quilting Council will come up. It lists all the guilds from all over the state. Good source of information since not all guilds are alike. One relates to art quilts, for example. I found it took time to feel comfortable in a guild, but once you know some members and you get to know them, it is great. Good luck!


Digi Belize officially inaugurated its New Digi Store on Saturday, March 30, 2019. The New Digi Store is located at the Wing's Building on Coconut Drive. Island residents enjoyed awesome deals and Top Up at the new store during the inauguration. Be sure to drop by and check out their new office as they are currently having awesome promotions on phones and much more.
Child Stimulation Month is coming to an end and teachers and students from all across have been busy carrying out fun activities throughout the month of March. Today, Wednesday, 27 March 2019, Pre-School teachers participated in an Early Childhood Expo which was held at the San Pedro Central Park. There were different booth from Reading Stations, Arts and Crafts, Music and so much more. Students, teachers and parents enjoyed fun games and activities throughout the day. Here are a few pictures for your viewing pleasure.
Sergio and Zennia Gomez formally presented 15-year-old Rhea Gomez to society as a young lady in the community at her Quinceañera birthday party that was celebrated on Saturday, March 2, 2019. After her special mass at the San Pedro Roman Catholic Church, family and friends celebrated at a reception held at El Patio Restaurant. It was a magical evening under a musical theme as per Rhea's love of music. Happy Birthday Rhea Gomez.
With much excitement island residents enjoyed a Carnaval Parade which was held on Saturday, March 2, 2019. The parade started off at the Bocal Del Area Park and headed down Laguna Drive heading its way to the town core. There was lots of music and merriment by both carinval dancers and spectators. Leading the parade was a golf cart with Don Juan Carnaval followed by fun cartoon characters, Titans Mas Band Carnival Group along with the ever popular Ernestine Carballo. Also joining the parade was the Miss San Pedro Float, Reinas del Carnaval and Nayobie's Hope for Children Group.
Child Stimulation Month 2019 kicked off countrywide under the theme "Hug Me, Listen to Me, Read with Me – Help Me Grow". Like clockwork, Child Stimulation Month commences on the first day of March every year, with it bringing an array of activities for the pre-school children of San Pedro. Pre-Schools on the island celebrated the opening of Child Stimulation Month with a parade through the main streets of San Pedro. Children were in colorful costumes displaying National Symbols of Belize, Colors, Shapes, Numbers, Sea Creatures and so much more.
The San Pedro House of Culture officially kicked off the Carnaval 2019 celebrations on Friday, March 1, 2019 with a Carnaval Comparsa Fashion Show. Those in attendance enjoyed brief history of carnaval comparasas as models showed off their costumes and danced for the crowd. Here are some pictures of the event. The San Pedro House of Culture is currently hosting a photographic exhibit of carnaval, feel free to drop by and enjoy some pictures by photographer Karen Brodie.
The San Pedro Lions Club hosted their annual Children's Christmas Party with Santa. Children happily greeted Santa as he made his entrance at the Lions Den ringing his bell. They sat and waited for their turn as their names were called to receive their special gift and take a picture with Santa and his helpers. Merry Christmas to every one!
Ambergris Today and the community of San Pedro extend warm and cheerful greeting to don Lucito and doña Angelita Guerrero as they celebrate their 65th wedding anniversary today, December 20, 2018. Pillars of the community and members of the founding families of Ambergris Caye, this lovely couple is truly admirable, to say the least. We extend them warm wishing and blessing during the holidays and many more beautiful years together. Don Lucio is 88 years old and doña Angelita is 83 years old. They have six children, 2 girls and 4 boys, 16 grandchildren and 14 great grandchildren, WOW!
Christmas Season is here and schools around the island are busy with Christmas shows and Christmas parties, spreading cheer with students, teachers and parents. Family and friends gathered at ABC Pre-school on Thursday, December 13, 2018 to see a specatucal show put on by three and four year olds. The children danced and sang along with teachers as they performed energetic and fun dances. Here are a few pictures of the event for your enjoyment! - Merry Christmas from ABC Pre-School!
Founder's Day was once more celebrated at San Pedro High School. The faculty, staff and students of San Pedro High pulled off another great celebration as tradition has it, San Pedro High School is always up for a celebration in commemoration of (now retired) Principal Angel Nuñez every year on December 5.
A September to Remember - Celebrating our country's Independence is something rather important and there are many events leading to the grand celebration. We have combined some pictures of a few events that took place on San Pedro, Ambergris Caye commemorating our country's Independence. San Pedro High School held a reenactment of the raising of the Belize Flag for the first time on Independence Cay 1981; the British Flag came down. Mr. Angel Nunez was the guest speaker for the event and a poster competition was held among the Freshmen Class.


Marketing websites have become the bare minimum expectation for those looking for tax and accounting services. So it's easy to treat your own website as a "set it and forget it" solution. On the other hand, investing in your website is a process that will pay dividends if done correctly. When your website has a purpose and strategy, it can provide business value that more than makes up for its expense. Here are a few ways your website strategy can create business value.
Continually updating your website with helpful news and events keeps your business in the forefront your site visitors' minds. Not only does your content actually help your clients, it also positions you as an authority in your field. It encourages those who visit your site to look to you for expertise.
Your site content connects you to your to your clients. But the tools on your site also bring you closer to your clientele. Leveraging secure file sharing utilities like File Share and Portal makes everyone's job easier. As it draws people to your site, it diminishes the distance between you and your clients making your relationship easier to manage.
Your website gives your business a unique opportunity to share with the world what makes your business unique. Your firm profile doesn't have to be boring. It can showcase your broad appeal and niche specialties that highlights the value proposition that brings clients to your doorstep. This is especially helpful for new clients, for example. Choosing a new tax and accounting service provider may be a daunting task for those just starting out on their financial journey. Your website can help de-mystify what your firm can provide to these people.
Tools like eNewsletters can transform your website from a glorified Yellow Pages ad to a lead generation engine. By proactively reaching out to your site visitors and managing client relationships, your marketing website can cease being a receptacle for firm information and content (as helpful as that may be) and start acting as a hub around which you and your clients interact.
Shifting the paradigm from static information to a dynamic relationship manager is a powerful new way of thinking about your website. Fortunately, by using CCH Site Builder, the hard work is done for you. Contact a solution consultant if you have any questions about how to take full advantage of the tools that come with a Site Builder subscription. Or start a CCH Site Builder test drive today.


By 2011, featured artists, duets and collaborations were the rule rather than the exception, with most dance and R&B tracks credited to several acts. And it wasn't always established names joining forces - although that did happen. A lot.
Often, a new artist would be launched by some well positioned guest appearances before their debut solo effort surfaced - ensuring name recognition from the outset. It's a model that continues today, with the likes of Sam Smith and Emeli Sandé getting their first hit on someone else's song.
Like most of her albums, Beyoncé's 4 featured a seemingly endless supply of singles - and, as usual, some were great, like "Love On Top" and "Best Thing I Never Had" (number 88 on this list), and some were an acquired taste, like lead single "Run The World (Girls)". The poppiest track on the album, "Love On Top" came with a rehearsal-to-performance video that reminded me of Kylie Minogue's "Wouldn't Change A Thing" clip.
Here's another old school-style feelgood track - the second single from British indie band The Go! Team's third album, Rolling Blackouts. A jangly guitar tune that sounded like it could've been released in the late '80s/early '90s, "Buy Nothing Day" is guaranteed to always put me in a happy mood - whether or not that's the intention, I'm not sure.
Two years on from his assault of then-girlfriend Rihanna and Chris Brown's music career was recovering from the downturn it took in the aftermath of the shocking incident. Sales and chart positions improved, but the singer wasn't completely able to escape his past - as a violent blow-up on the set of Good Morning America proved. Like many people, I was conflicted about liking a Chris Brown song - but I figured if I could like a Milli Vanilli song and not really care that Rob and Fab didn't perform on it, I could like a Chris Brown song and not really care that he did. Besides, thanks to heavily altered vocals and production from Benny Benassi and his cousin Alle, "Beautiful People" didn't even sound like a Chris Brown song. Benny, meanwhile, had his first big solo hit in Australia in eight years with "Cinema" (number 64 on this list).
From one end of the male artist spectrum to the other - and the squeaky clean lead singer of boy band Jonas Brothers, who released his debut solo album, Fastlife, in 2011. Lead single "See No More" was actually co-written by Chris Brown, who also provides backing vocals, but despite that and Joe's massive fanbase, the single and album were commercial disappointments.
Not one of the three singles taken from the album of the same name, "Record Collection" was my second favourite track (after "Bang Bang Bang") and features contributions from Duran Duran's Simon Le Bon and rapper Wiley.
The title of DJ/producer Daniel Stein's third album, Nextlevelism, was pretty spot-on, since this lead single gave him (in his guise as DJ Fresh) his first UK number 1 single and suddenly made him one of the biggest names in British dance music. "Louder", which features Kosheen's Sian Evans on vocals, was also the first dubstep chart-topper in the UK - proof positive that the formerly underground genre had gone mainstream.
She appeared in my top 10 for 2010 with "Left Too Late" from her debut EP, Introduction, and in 2011, singer/songwriter/drummer Florrie returned with a second EP, Experiments. Once again helmed by production team Xenomania (for whom she worked), the six-track EP boasted two singles, "Begging Me" and "I Took A Little Something" (number 106 on this list), which I treated as separate releases.
An instant number 1 in homeland New Zealand in 2010, "Young Blood" took the rest of the world by storm in 2011 - and was virtually inescapable, appearing in ads and on TV shows, and being recorded by other artists. The ubiquity of the track turned The Naked & Famous into one of the most buzzed about acts in the world - although next single "Girls Like You" (number 83 on this list) didn't follow in the footsteps of its predecessor. I was a fan beyond this one song, though, and when the band toured Australia with New Order in 2012, it was one of the rare occasions that I turned up to the show in time to see the support act.
She's Australia's answer to Beyoncé and Rihanna, so it only seemed natural that Jessica Mauboy would do as her contemporaries did and repackage her second album, Get 'Em Girls, with some fresh new tracks, like this Diane Warren composition that took Jess back to the ARIA top 5 for the first time since 2008's "Burn". She also released two duets during 2011 - "What Happened To Us" with Jay Sean (number 76 on this list) from the original album and "Galaxy" with fellow ex-Idol contestant Stan Walker (number 87) from the deluxe edition.
Like Tove Styrke (who we saw in Part 2), Ola Svensson had been a contestant on Sweden's Idol - although he competed way back in 2005 and only came eighth. Still, "All Over The World" gave Ola his 10th consecutive top 5 hit in his homeland - and was his first song to reach my ears. Incidentally, Ola's first single, "Rain", was a cover of Australian Idol runner-up Anthony Callea's 2005 hit.
Her Aphrodite album might have yielded her least successful batch of singles ever, but it wasn't for want of trying. Kylie even ventured back in time (see what I didn't do there?) to enlist the remixing services of PWL legend Pete Hammond, who gave this track a retro spin. I was also a fan of the album's title track (number 53 on this list) and was able to check out the album's accompanying tour while visiting the UK - and, as my Google profile picture shows, even came face-to-face with Kylie for the first time later that year when the show arrived in Australia and an "intimate showcase" was thrown by her record company. Brag over.
2011's second UK chart-topping dubstep single came from the British dance act that'd been releasing tracks since 2005, first as a duo (Joseph Ray and Daniel Stephens) before the arrival of vocalist Alana Watson in 2008. "Promises" was the fourth and biggest single from the trio's debut album, Welcome Reality.
It was nowhere near as successful as previous hits "Happiness" and "Good Girl", but "Hush Hush", particularly the Cahill Full On remix, was actually my favourite of the three singles from Alexis Jordan's debut self-titled album. Seems that the follow-up is turning out to be the epitome of a difficult second album, with false starts and delays meaning it still hasn't surfaced.
She'd guested on a Flo Rida single (2009's "Sugar") and had a surprise number 1 hit in Australia (2010's "Dirty Talk"), and in 2011, American singer Wynter Gordon (real name: Diana) released her debut album, With The Music I Die, and this ARIA top 20 single. As a result of all her Australian success (which also included a guest spot on Marvin Priest's "Take Me Away"), Wynter's 2010 collaboration with Freemasons, "Believer" (number 82 on this list) was also given a new lease of life, but it, like everything else that's come since, has failed to make the same impact.
One of the most exciting new synthpop acts in 2011 was British trio The Good Natured - who would feature prominently on my next few year-end charts before getting caught up in record company wrangling. Here's hoping the band, now called Lovestarrs, can get back on track.
Like Calvin Harris, David Guetta had graduated to the big time, breaking the US and now able to work with A-list artists like Usher, Nicki Minaj and Snoop Dogg, who all featured on the Nothing But The Beat album. Big-name singers who didn't appear on the album were Mary J Blige and Katy Perry, who were both offered "Titanium" (number 56 on this list) - but in the end, co-writer Sia, who'd recorded a demo vocal, was chosen to perform the finished version.
It was back to the world of major labels for Darren Hayes in 2011, following his independently released 2007 opus, This Delicate Thing We've Made. It was also back to pure pop, with this lead single from the Secret Codes And Battleships album proving to be as catchy as anything he'd previously released. "Talk Talk Talk" even came with two great bonus tracks - one, a remix called "Out Of Talk", which mashed up the song with Hall & Oates' "Out Of Touch", and the second, a cover of Madonna's "Angel" (number 60 on this list). The obligatory weepy ballad, "Bloodstained Heart", followed, while "Black Out The Sun" also makes this chart (at number 78).
"That's The Truth" was the best thing McFly had released in half a decade. It also just happens to be the last single by the band I've liked, since they've opted for more of a Jason Mraz-lite style since.
Yasmin Shahmir is one of those emerging singers who appeared on someone else's record - Devlin's "Runaway" - before proceeding with her own career. That career included two solo singles in 2011 - "On My Own" (number 58 on this list) and "Finish Line". The latter came with a Freemasons overhaul, which as usual, sounded markedly different from the Stevie Wonder-sampling original.
In Part 4: two of the biggest boy bands of all time form a supergroup, the Glee cast take a break from releasing covers, and some of the biggest female pop stars on the planet do battle.
It's been 25 years since "With Every Beat of My Heart." Great song written by Lotti Golden, Arthur Baker, and Tommy Faragher, all innovative producers of early hip hop and electro. Would have been Number 1 if they had produced it as well, ha ha!
It has! I agree it's a great song - and I look back at it on my 25 years ago post for this week (link in the blog archive menu on the top right).


Being split in two halves is no theory with me, Doctor.
For what two days? Three?
And here we are a new Star Trek Peanuts mashup or as I'm calling the Trek Nuts. I "could" just start at the beginning and do one for every episode but I'm going to hold off that temptation because I do want to do mashups of other franchises first but I think we can sprinkle some in now 🙂 .
I'm on record of being pro-unicorn dog so naturally they needed to make an early appearance.
You can buy the one of original of this here if someone hasn't already snapped it up.


All the information on this website – http://lifemagnets.org – is published in good faith and for general information purpose only. fondra does not make any warranties about the completeness, reliability and accuracy of this information. Any action you take upon the information you find on this website (fondra), is strictly at your own risk. fondra will not be liable for any losses and/or damages in connection with the use of our website. Our Disclaimer was generated with the help of the Disclaimer Generator by KarismaID WordPress Theme.


Without a doubt, the GoFlight GF-166 VRP (Versatile Radio Panel) Module is the device of choice for simulation of radios in the sim cockpit. Designed to look and operate like many of today's real-world NAV/COMM counterparts, the GF-166 offers sophisticated looks and an unprecedented level of functionality in a 2" tall rack-mountable configuration. Real-world pilots will instantly recognize the control layout of the GF-166, and flight sim enthusiasts love its realistic look and feel.


text:
NCBA provides updates on current policies, markets, future work
January 7th, 2022 by Wyoming Livestock Roundup
Washington, D.C. – During a press conference held Dec. 21, National Cattlemen's Beef Association (NCBA) Vice President of Government Affairs Ethan Lane provided an update on policy changes in the Biden administration affecting agriculture.
During the call, Lane positively reflected on the work done by the NBCA in the last year and their future plans going into 2022.
NBCA work in 2021
"Sitting here reflecting back on the first of the year with the Biden administration, I think we're pretty pleased with the progress NBCA has made," shared Lane. "First and foremost, we have to start with where we are ending, which is with the Build Back Better Initiative and some of the large, aggressive spending plans which were advanced by this administration pretty quickly as they took off in January 2021."
Lane noted NBCA spent a lot of time during the past year educating voters on Capitol Hill, consumers around the country and others about the multi-trillion-dollar spending packet, which could negatively affect cattle producers around the country.
Several of the policies proposed recommended changes in the stepped-up basis, which allows people who inherit property to file lower capital gains taxes, utilize higher estate and gift tax limits and the addition of 40 percent capital gains. All these could negatively affect producers' ability to pass on operations to the next generation in the next 15 years, explained Lane.
"I'm really proud of the work NCBA did leading this charge in Washington, D.C., not just for the cattle industry and agriculture, but really small business owners throughout the industry," shared Lane. "We know NCBA is going to have to continue to focus on these issues moving into 2022 as we see whatever the next version is of the Build Back Better initiative might be that Democrats are working to put together after the first of the year."
In addition to NBCA's work, hundreds of other groups stood with the cattle industry and together provided pushback on these proposals, he explained.
"We're really proud of the work and the effort that was undertaken," he said.
Changes on Capitol Hill
Another area of focus for NCBA was on sustainability and climate goals.
Earlier this fall, NBCA announced and solidified the industry's commitment to environmental, economic and social sustainability goals with the release of their U.S. Cattle Industry Sustainability Goals.
The goals included: demonstrate climate neutrality of U.S. cattle production by 2040; create and enhance opportunities which result in a quantifiable increase in producer profitability and economic sustainability by 2025; enhance trust in cattle producers as responsible stewards of their animals and resources; expand educational opportunities and continue to improve the industry's workforce safety and well-being.
In previous years, administrations have viewed grazing and the cattle industry as a threat, but today have embraced these practices as a climate solution, explained Lane.
"This is a real step for NCBA and I think [NBCA's sustainability goals] have been well received in Washington by policy makers," said Lane. "NBCA looks forward to continuing to push forward because there is tremendous number of opportunities for producers who are already producing the highest quality beef in the world with the lowest environmental footprint, and to continue to not only make progress on that front, but find ways to connect with consumers who are looking for new opportunities to benefit in their businesses from the good work that is already being done throughout the industry."
Markets and cattle prices
Another large focus for NBCA in the past year has been on cattle markets and prices, and the components affecting producers and the products they produce throughout the supply chain into the packers and retail sectors, explained Lane.
"NBCA continues to have robust dialogue with the administration on things like packing capacity, as we monitor some of those funds that are going to be coming out soon," said Lane. "We need to make sure we're looking for opportunities that create new packing capacity in areas which are underserved now, and we need to make sure new packing capacity is created in a way that is generating new opportunities for producers to generate more value for their product, and put more of that beef dollar back on the ranch rather than further down the supply chain."
There is a tremendous amount of demand both nationally and around the world, and NBCA is working to capitalize on this demand further into 2022.
NBCA is also looking to focus on topics such as price discovery and providing producers the best option for them to market their cattle. The association will continue their conversation on price discovery Feb. 1-3, at the Cattle Industry Convention and NBCA Trade Show in Houston, Texas, noted Lane.
Rulemaking in 2022
Rulemaking has been a big focus with the current administration, shared Lane.
"We're seeing a lot of rollback of Trump administration rules," Lane said. "It's disappointing to see some of those rules labeled as problematic, simply because of the administration they came out of when those of us who sat at the table when those rulemakings were done know full well there was strong representation from all different kinds of groups."
Going forward, NBCA is intending to engage aggressively in future rulemaking changes.
Foreign markets
There has been a dramatic increase in foreign markets, explained Lane.
"The U.S. is now exporting nearly $10 billion a year to foreign markets," he said. "This growth has been unbelievable."
Conversations will continue about opening up additional markets with access to places across the world.
"As the industry looks towards the next few years, NBCA wants to see market trade growth and capacity build, so the industry can stay in the position to keep the world provided with U.S. protein, which consumers love so much," concluded Lane.
Brittany Gunn is the editor of the Wyoming Livestock Roundup. Send comments on this article to roundup@wylr.net.
Posted in Government
Comments Off on NCBA provides updates on current policies, markets, future work
Ranch honored: Gray's Angus Ranch receives 2021 Nebraska Producer of the Year Award »
« Environmental Stewardship Award Winner: WSGA awards Johnson Ranch for innovative stewardship practices

redpajama_set_name: RedPajamaCommonCrawl