language-theory

What exactly are administrative redexes after CPS conversion?

In the context of Scheme and CPS conversion, I'm having a little trouble deciding what administrative redexes (lambdas) exactly are: all the lambda expressions that are introduced by the CPS conversion only the lambda expressions that are introduced by the CPS conversion but you wouldn't have written if you did the conversion "by hand"...

Classic Academic Textbooks

I'm familiar with both the Wizard Book: Structure and Interpretation of Computer Programs and the Dragon Book: Compilers: Principles Techniques and Tools However, I'm curious to find out which other classic academic textbooks people would consider essential reading for a programmer. ...

Why should I learn algorithms?

Hi all, This is my first qestion in the forum. I am a student of Software Engineering. Today I asked this question to my teacher in class. But did not get any satisfactory answer Can any one please give me some insight why should i learn this topic in my graduations. ...

Runtime definition

What is the runtime? And I don't mean "at run time" = as the program/script is running. I mean The <your-interpreted-language-here> runtime ...

What is the possible benefit (if any) of allowing recursive contructors?

In Java, constructors cannot be recursive. Compile time error: "recursive constructor invocation". Let's assume that we did not have this restriction. Things to keep in mind: The return type of a constructor is void. Since it is a void method you can't harness the complete power of recursion. A constructor can invoke itself (or any ot...

Context Free Language Question (Pumping Lemma)

I know this isn't directly related to programming, but I was wondering if anyone know how to apply the pumping lemma to the following proof: Show that L={(a^n)(b^n)(c^m) : n!=m} is not a context free language I'm pretty confident with applying pumping lemmas, but this one is really irking me. What do you think? ...

How do you classify languages into regular, context free, and phrase-structure?

If you're given a language, how do you figure out if it's regular, CF but not regular, or phrase-structure but not CF? Is there a good way to attack this problem? I could randomly try to make FAs or PDAs, but I feel like there's a better way to do it. Classic example: L = { a^n b^n c^n | n >= 0 } Where would one start? Thanks. ...

Theory of formal languages - Automaton

Hi everybody ! I'm wondering about formal languages. I have a kind of parser : It reads à xml-like serialized tree structure and turn it into a multidimmensionnal array. My point is on the similarities between the algorithm being used and the differents kinds of automatons ( state machines turing machines stack ... ). So the question i...

Free online tutorial on the 'thought process' behind developing a programming language?

When I read about different computing languages on here, I always wonder what motivated the original decision to develop something new instead of just extending a language which already exists. Question: How does someone go about 'designing' a new programming language and how do they decide objectively which choices to make? If there a...

Which formal language class are XML and JSON with unique keys (they are not context-free)

JSON and XML are both frequently called to be context-free languages - they are both specified mainly by a formal grammar in EBNF. However this is only true for JSON as defined in RFC 4329, section 2.2 which does not require uniqueness of object keys (many may not know but {"a":1,"a":2} is valid JSON!). But if you require unique keys in ...

.NET application to write and build another application

In my constant strive to under promise and over deliver I'm looking to make a .Net tool to create simple .Net applications that the non-programmer superiors can use. How would I go about writing and compiling the code? Explanation of intent: I want my superiors to, rather than ask me to make a barcode label app, select a few options, do...

regexp-like library for matrix pattern search

Is there a library (in any language) that can search patterns in matrixes like regular expressions work for strings ? Something like regular expresions for matrixes, or any matrix pattern search method ? ...

What does it mean for a language to be statically typed?

My understanding is that it means that one can potentially write a program to formally prove that a program written in a statically typed language will be free of a certain (small) subset of defects. My problem with this is as follows: Assume that we have two turing complete languages, A and B. A is presumed to be 'type safe' and 'B' i...

Is there any object-oriented static typed language with variables with few types?

I like reading about programming theories, so could you tell me if there is any object-oriented static typed language that allow variables to have a few types? Example in pesudocode: var value: BigInteger | Double | Nil I think about way of calling methods on this object. If object value have type BigInteger | Double language could al...

Regular expression for strings with even number of a's and odd no of b's

Im having a problem in solving the problem:- Its an assignment, i solved it, but it seems to be too long and vague, Can anyboby help me please...... Regular expression for the strings with even number of a's and odd number of b's where the character set={a,b}. Thanks in advance... ...

How are "pattern languages" related to "regular languages"?

I always thought that there was no real language class below type-3 grammars, but now I found the "Language identification in the limit" model which allows learning of pattern languages but not regular languages. What exactly are pattern languages and what's their difference from regular languages? ...

Out of curiosity, how many people here know how regular expressions are compiled?

I'm going over this in my theory class, and I'm curious as to how many people here know what regular expression compilation actually is. I've looked online, and it seems to me that this is a more archaic topic that I thought it was. So yeah, who here knew before reading this question that a regular expression compile is performed by co...