Most Popular

1500 questions
11
votes
1 answer

Alternatives to Defunctionalization

Defunctionalization is a transformation first described 1972 by John C. Reynolds to eliminate higher-order functions. Are there alternative transformations (more efficient?) to eliminate higher-order functions?
Peter
  • 361
  • 1
  • 5
11
votes
1 answer

Types as first class Citizen

Coming from a C++ background I don't understand why one needs types / type expressions as first class citizen? The only language I know that supports this feature is Aldor. Does anybody have some literature about types as first class citizen or know…
paul98
  • 113
  • 5
11
votes
1 answer

Literature about a naive approach to graph isomorphism by inspecting polynomials of adjacency matrices

I describe an approach to graph isomorphism which probably has false positives, and I am curious whether there is literature indicating that it does not work. Given two adjacency matrices $G, H$, an admittedly naive method of checking for…
Lieuwe Vinkhuijzen
  • 4,457
  • 18
  • 28
11
votes
1 answer

Can properties such as memory usage of a function be expressed in a dependently typed language?

Suppose one wants to reason about properties of code beyond things like totality and functional purity - one also cares about the memory consumption, or algorithmic complexity of a function. Can this be done through dependent typing and effects…
11
votes
1 answer

Programming language semantics prototyping tool

Is there any tool for prototyping a programming language semantics and type system and that also allows for some sort of model checking of standard properties, like type soundness? I'm asking this, because I'm reading a book on Alloy and it…
11
votes
3 answers

Is there a difference between $\lambda xy.xy$ and $\lambda x.\lambda y.xy$?

I am currently learning the lambda calculus and was wondering about the following two different kinds of writing a lambda term. $\lambda xy.xy$ $\lambda x.\lambda y.xy$ Is there any difference in meaning or the way you apply beta reduction, or…
magnattic
  • 557
  • 4
  • 11
11
votes
3 answers

Automatic Downcasting by Inferring the Type

In java, you must explicitly cast in order to downcast a variable public class Fruit{} // parent class public class Apple extends Fruit{} // child class public static void main(String args[]) { // An implicit upcast Fruit parent = new…
Sam Washburn
  • 215
  • 1
  • 7
11
votes
3 answers

Are the words "expression" and "term" interchangeable in programming language theory?

When describing the syntax of a given programming language the words "expression" and "term" are often used to seemingly describe the same things. Are these words interchangeable in the context of programming languages?
11
votes
5 answers

Language of the values of an affine function

Write $\bar n$ for the decimal expansion of $n$ (with no leading 0). Let $a$ and $b$ be integers, with $a > 0$. Consider the language of the decimal expansions of the multiples of $a$ plus a constant: $$M = \{ \overline{a\,x+b} \mid x\in\mathbb{N}…
11
votes
2 answers

A Question relating to a Turing Machine with a useless state

OK, so here is a question from a past test in my Theory of Computation class: A useless state in a TM is one that is never entered on any input string. Let $$\mathrm{USELESS}_{\mathrm{TM}} = \{\langle M, q \rangle \mid q \text{ is a useless state…
11
votes
4 answers

What are common formal techniques for proving functional code correct?

I want to provide proofs for parts of a Haskell program I'm writing as part of my thesis. So far however, I failed to find a good reference work. Graham Hutton's introductory book Programming in Haskell (Google Books)—which I read while learning…
11
votes
3 answers

References on comparison between quantum computers and Turing machines

I was told that quantum computers are not computationally more powerful than Turing machines. Could someone kindly help in giving some literature references explaining that fact?
11
votes
3 answers

Why is the minimum height of a binary tree $\log_2(n+1) - 1$?

In my Java class, we are learning about complexity of different types of collections. Soon we will be discussing binary trees, which I have been reading up on. The book states that the minimum height of a binary tree is $\log_2(n+1) - 1$, but…
CodyBugstein
  • 3,017
  • 11
  • 31
  • 46
11
votes
3 answers

Are there parallel matrix exponentiation algorithms that are more efficient than sequential multiplication?

One is required to find power (positive integer) of matrix of real numbers. There are lots of efficient matrix multiplication algorithms (e.g. some parallel algorithms are Cannon's, DNS) but are there algorithms that are intended exactly for finding…
11
votes
2 answers

Is there a paradigm for composing "incremental update" functions in a pure dataflow style?

I don't know the correct terminology for asking this question, so I'll describe it with lots of words instead, bear with me. Background, just so we're on the same page: Programs often contain caches - a time/memory tradeoff. A common programmer's…
1 2 3
99
100