Questions related to design, implementation, and analysis of programming languages

learn more… | top users | synonyms (1)

0
votes
1answer
13 views

Why python 2 and 3 are so incompatible with each other?

Every software should have backward compatibility (at least some sense of it), this ensures old codes can run in the future updated systems without any problems in most situations. But why python team ...
1
vote
1answer
47 views

What is the complexity of Array[n] and Object.value

I faced a great doubt about the Complexity of two ways of calling a information. First I have an Array, if I call an array in a program like this: print array[0] ...
0
votes
0answers
11 views

How will quantum computing affect higher-level programming language design? [duplicate]

Much of what is currently being studied in quantum computing involves primitives whose classical counterparts are considered fairly low-level: qubits and quantum gates, just to name two of the more ...
0
votes
0answers
28 views

Where would one start if one would want to merge man and machine? [closed]

I have a project going on GitHub and other resources. The argument now is, which language would one use to create a "Man-Machine Interface" or simply a GUI to fully control a body heavily augmented? ...
1
vote
0answers
51 views

Which programming languages can be described by deterministic context-free grammars?

This question asks which programming languages have a syntax that cannot be described by deterministic context-free grammars - the answer is "Many [...] including Algol 60, C, and C++". Until ...
5
votes
2answers
54 views

What is the name for closure-type functions that use the call-site environment?

Closures are functions that borrow the environment in which they are declared and can use and modify its variables at any times indipendently from where they're called, like in this example: ...
3
votes
3answers
77 views

“In object-oriented programming, the program is organized around its data”

In a description of OOP in my textbook, it is written that “in procedure oriented program the program is organized around its code while in object oriented programming, the program is organized around ...
3
votes
2answers
68 views

Identity of object in OOP

In the object oriented programming concepts I found the term "Identity of object". What does it mean by "Identity of object"?
6
votes
0answers
74 views

When used as call stack, do garbage-free spaghetti stacks form a DAG?

I'm looking into implementation techniques for programming languages, and recently came across spaghetti stacks, which are supposedly a good fit for a continuation passing style model (given their use ...
0
votes
0answers
23 views

what is the connection between evaluation context and call by value?

I been reading about $\lambda$-calculus and related stuff, but I got some confusions which i want to clarify. The call by value reduction is expressed with two rules $$ \frac{e_1 \rightarrow e_1'}{...
1
vote
2answers
48 views

Is Terra the only system programming language able to compile code at runtime? [closed]

I stumbled across Terra last year, and the most similar language I can think of is Julia. Terra is inspired by and uses Lua for templating/metaprogramming instead of being derived from e.g. the Lisp ...
7
votes
1answer
342 views

Data Flow Analysis with exceptions

Data flow analysis work over a control flow graph. When a language under consideration supports exceptions, control flow graph can explode. What are the standard techniques for dealing with this ...
5
votes
1answer
89 views

Is it possible to prevent arithmetic errors with a dependent type system?

In a functional programming language I have functions like $$f\colon Int \times Int \times \cdots \times Int \to Int$$ which do some computation. However for certain arguments $(x_0, \dots, x_n)$ the ...
1
vote
3answers
271 views

Why the Smallest Operable Data Type in Most Programming Languages Is One-Byte Sized? [duplicate]

Why the smallest operable data type in most programming languages is one-byte sized? Is it possible that to operate with a single bit? If it is possible, how to do it in practical?
2
votes
2answers
46 views

Is the punctuation part of the alphabet?

Given a language $L \subseteq \Sigma^*$, (it could be Italian, English, C++ or anything else), should we consider the punctuation (".", ";", "->") as a part of the alphabet $\Sigma$ upon the ...
4
votes
2answers
73 views

Does every procedure have a structural equivalent?

Suppose I have a basic mathematical function like: $ f(x) = x^2 + 2$ implemented in typed pseudo-code as: int f(x) { return x*x + 2; } If we were to break ...
4
votes
2answers
95 views

Is there a point to an all-encompassing programming language? [duplicate]

There are many programming languages in use throughout the world today, including languages that specialize in database manipulation, functionality, object-orientation, concurrency, etc. Would there ...
1
vote
1answer
61 views

On the fly manipulation of operators

Assume that you are writing sorting algorithms, and that you want the ability to select between ascending and descending order. The only change required to do this for comparison sorts is to use the ...
1
vote
1answer
36 views

Can LOOP-Programm stop when its value goes below 0?

I am wondering, if in the LOOP programing language, whether instances of the LOOP x DO P END are defined to stop in the case $x < 0$. The definition only says "...
2
votes
1answer
43 views

What are these questions in the PoplMark challenge asking?

I was reading the paper Mechanized Metatheory for the Masses: the PoplMark Challenge by Aydemir et al (PDF) and I found the following three questions on page 13 of the PDF a bit confusing. ...
3
votes
1answer
47 views

How does recursion works when there are 2 or more consecutive recursive calls?

I was learning about recursion and i came across the following pseudo code for quicksort. ...
0
votes
0answers
11 views

how to understand these in PoPLMARK challenge? [duplicate]

I was reading the PoPLMARK challenge and in the paper proposed that challenge, I find some parts confusing me, here original paper. In challenge 3:Testing and Animating with respect to semantics, I ...
4
votes
2answers
82 views

Is there a relationship between “sound and complete” in logic and “type safety” in PLs?

I've been wondering if there's a connection between "good logics" and "good programming languages". It seems that logics are shown to be "locally sound and complete" whereas programming languages are ...
3
votes
3answers
275 views

Number of possible programs in a language

Is the number of possible programs usually finite or infinite? I'm playing with the idea of generating all possible programs for a language - is that even a finite number or must we be more specific, ...
7
votes
2answers
98 views

Why is BNF considered an unsatisfactory technique for describing a language?

I was reading the paper Fundamental Concepts in Programming Languages by C. Strachey the other day, wherein I read something that was quite strange to me. Quoting directly (with the strange part ...
1
vote
2answers
40 views

Should names of built-in funtions be part of BNF grammar?

We're creating our own programming language for a subject. And we're confused whether to add the names of the functions we want to have in our language (like our own version of print) in the BNF ...
7
votes
3answers
202 views

Why do we have to trade abstraction for speed?

Why can high-level languages seemingly never reach lower-level languages in terms of speed? Examples of high-level languages would be Python, Haskell, and Java. Low-level languages would be trickier ...
0
votes
0answers
16 views

Is XSL-Transformation a type of compiling? [duplicate]

I am currently working on a paper based on the topic of creating a source-to-source compiler from an existing application to C#. The existing application is actually just based on XML files, which ...
7
votes
2answers
117 views

Running programs backwards

I never used a debugger that can run a program backwards but I would like to. Now I wonder if there is much evidence and theory about backwards runnable programming, when and why a program can be run ...
3
votes
3answers
171 views

Do we create a programming language by writing a compiler?

Say, I wanted to create my own programming language. Assuming that I have made all of the decisions about how I want it to look and act, do I just need to write a compiler for it? For example, is ...
7
votes
0answers
43 views

Denotational semantics of object-oriented languages

I am interested in denotational semantics of object oriented languages. Namely, what are the common/typical denotations of objects used in the literature? Is this an interesting topic these days? The ...
4
votes
1answer
61 views

Which object-oriented programming language is the closest to the untyped sigma-calculus?

I'm wondering which of the dynamic object-oriented (or prototype-oriented) languages (like JavaScript, Ruby, Python, etc.) can be considered as the closest to Abadi and Cardelli's untyped sigma ...
7
votes
2answers
167 views

What are the most expressive, terminating languages?

I'm less interested in languages where you can write almost anything, but then are required to write an accompanying proof that what you wrote terminates. I'm more interested in the design space of ...
0
votes
1answer
45 views

How does a language abstract away from underlying byte machines?

So as the title suggests, How does a programing language, such as Java or C, abstract itself away from underlying byte machines? Im curious, because I know that static/dynamic typing, data ...
56
votes
13answers
15k views

How can I explain to my parents that I study programming languages?

I am currently finishing my MSc in computer science. I am interested in programming languages, especially in type systems. I got interested in research in this field and next semester I will start a ...
3
votes
2answers
65 views

Why do some authors not include summation in the $\pi$-Calculus?

In Robin Milner's book "Communicating and Mobile Systems: the $\pi$-Calculus", on page 87, the set of expressions of the $\pi$-Calculus is defined as $$P ::= \sum_{i\in I} \pi_i.P_i\ {\huge|}\ P_1|...
2
votes
1answer
45 views

Examples of context sensitive syntactic constructs (statements)

So, I am implementing a context sensitive syntactic analyzator. It's kind of an experimantal thing and one of the things I need are usable syntactical contructs to test it on. For example, the ...
4
votes
0answers
84 views

What techniques could be used to support thread-local contexts and resources in a language?

I am interested in the subject of thread-local contexts, which is a feature that I use quite often in solutions, but seems to lack first-class support in any languages I have used. Quite often in ...
5
votes
1answer
244 views

Why injection into sum type apparently leads to ambiguity?

I have been reading Benjamin Pierce's Types and Programming Languages, plus a couple of course notes on type systems and typed $\lambda$-calculus, and there is one thing I don't get: it seems that ...
2
votes
0answers
19 views

Framework of code generation in model-driven development workflow. Is formal language semantics necessary?

I am implementing worflow where the code in industrial programming languages (JavaScript and Java) should be generated from the formal (formally verified) expressions (from ontologies as objects and ...
-1
votes
1answer
33 views

How is a procedure application a control structure?

In scheme, a procedure application is considered as a control structure. Why is this?
1
vote
0answers
33 views

DML , ML with restricted dependent types

Refering to this paper Dependent ML: An Approach to Practical Programming with Dependent Types Have defined datatype 'alist ( int ) Its not clear why they have used int as a parameter rather than a ...
2
votes
0answers
46 views

Question about Dynamic Scoping example output

I'm trying to do a runtime stack on a simple code example that uses dynamic scoping. The code is this: ...
0
votes
1answer
74 views

I want to pursue a career in computer programming. Where do I start? [closed]

I am currently finishing up my junior year as a Biochemistry major at a 4-year university. In a year, I will graduate with a B.S. in Biochemistry and way more credit hours than anyone should ever have ...
4
votes
1answer
34 views

Incremental compilation over AST

Is incremental compilation ever done based on the AST? That is, the compiler would just regenerate code for the parts of the AST that have changed. I know that many compilers do incremental ...
3
votes
1answer
123 views

How can I check constraints on my state machine behaviour?

My background is fairly practical rather than theoretical, so this question may be a bit basic. I have a state machine with events, and events may optionally trigger action functions to be called as ...
-2
votes
1answer
73 views

What is the difference between the friend class and inheritance consept in C++? [closed]

In C++ ,friend class allows us to inherit the proprieties of one class to another class(es) which is also possible using inheritance. And also in inheritance we can set different levels of privileges ...
2
votes
3answers
115 views

Design patterns for simple text based scripting language?

In my current application I am trying to determine the best way to implement a simple scripting language. This language would allow a user to create a script that controls a machine with various ...
1
vote
1answer
35 views

Matrix of Matrices in Python [closed]

I want to create a matrix where each entry itself is a random matrix. What would be a good way to represent this? It is not necessary but some hints on how to implement your proposed solution in ...
21
votes
0answers
405 views

on “On the cruelty of really teaching computing science”

Dijkstra, in his essay On the cruelty of really teaching computing science, makes the following proposal for an introductory programming course: On the one hand, we teach what looks like the ...