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

learn more… | top users | synonyms (1)

-1
votes
0answers
13 views

How do you read from a specific point in a large text file? [on hold]

I'm currently working on an assignment using C which takes in a chat log .txt file and calculates average words per sentence & average word length for specific users. The part i'm stuck on is how ...
0
votes
1answer
26 views

Soon to be computer science major with some questions [on hold]

I'm going to apologize in advance for this wall of text, and if you're looking for me to ask technical questions about the field, that isn't what this post is going to be. So this Fall I'm going to be ...
-2
votes
0answers
20 views

I need help with this multiple method program, please [on hold]

Recently I proposed to learn the Java programming language. So I started reading a book called how to program in java by Deitel & Deitel seventh edition. As you can imagine the book addresses key ...
1
vote
1answer
69 views

Terminology - the reason for symbol reuse in programming languages

What is the term in programming language creation that is the rationale for symbol reuse? Though potentially confused with overloading, it is not so much the application of symbol reuse, but the ...
-2
votes
0answers
10 views

Too few arguments in function, need help with program in C [on hold]

So I made a Celsius and Fahrenheit Converter in C but I have come across an error in my program. My functions seem to be not working when trying to output the conversion of the temperatures. Could ...
0
votes
0answers
41 views

Variable argument placement in methods

Imagine that we have a base class number that has implemented a integer and floats, but not complex numbers and that we would like to extend it to also support ...
-2
votes
0answers
20 views

User input is entered vertically and not horizontally in C++ Need help [closed]

So recently I've been practicing C++ and I've noticed that when I do a printf and scanf in C, then the user input is entered horizontally. But as soon as I do that in C++ (cout and cin) then it's ...
0
votes
0answers
10 views

conditional compilation in c language [migrated]

#include<stdio.h> #define NUM 10 main() { #ifdef NUM printf("compilation succesfull"); #endif } the above code compiles perfectly ...
0
votes
1answer
114 views

GOTO statement in programming environments for beginners?

As a student, back in the day, I was exposed to high level programming languages that not only had a GOTO statement, but on which its use was common. I also did my fair share of programming in ...
-1
votes
0answers
21 views

Definition of data and control?

Do you know of a definition, from a realiable source such as a textbook, of the terms Control and Data? In the sense they are often contrasted in programming languages, e.g. Haskell libraries.
0
votes
0answers
10 views
-1
votes
1answer
25 views

Where to learn about Short-circuit evaluation? [closed]

I would like to implement short circuit evaluation logic in my code. And I want to know about the full details how it works? Ex: function a() {return true;} function b() {return false;} function ...
2
votes
1answer
29 views

How to understand equivalence of indexes of a family of types that are not definitionally equal

So I've been reading things about HoTT and trying to get solid on the foundations before getting too much further into the book. I am confused by a certain point; maybe I just haven't read far enough ...
2
votes
2answers
134 views

Automatic translation between formal languages

There are parser generators (some of which are limited to certain classes of grammars) which, given a grammar, automatically generate a parser for that grammar. Would it be possible to make a ...
0
votes
1answer
51 views

What advantages does Block Programming Environment have over High Level Programming Language

What advantages do block programming environments like App Inventor have over high level programming languages like Python or Java?
1
vote
1answer
20 views

What additional expressivity does polyvariance give in pushdown CFA?

I'm reading through Pushdown Control-Flow Analysis of Higher-Order Programs, which presents a synthesis of the Abstracting Abstract Machines technique and pushdown automata to get static analysis ...
16
votes
4answers
2k views

How do garbage collectors avoid stack overflow?

So I was thinking about how garbage collectors work and I thought of an interesting issue. Presumably garbage collectors have to traverse all structures in the same way. They can't know weather they ...
7
votes
0answers
113 views

Why do we have to forbid non-conforming lower and upper type bounds?

(it's a repost of my unanswered question from scala-user@googlegroups.com about Scala) In the Scala Language Specification, ยง4.4 Type Parameters, there is a requirement: The most general form of ...
3
votes
4answers
564 views

Do we need recursion in programming language to solve any problem?

My question is simple: If we want to be able to solve every problem, that we can solve using recursions, do we need programming language to allow us use recursions? Assuming we are allowed to use: ...
2
votes
1answer
25 views

Return values of Probabilistic Programs

Syntax and semantics section of this paper on probabilistic programming mentions that the return expression of the program is a function f satisfying $ f : \sum \rightarrow ...
1
vote
1answer
87 views

Is there a term for “delegate” function in CS?

This question is all about terminology (names). When you consider "list", this term is well defined in CS -- despite the fact programming languages use and misuse this term (for example C# ...
3
votes
2answers
52 views

What's the difference between declarative syntax and encapsulation?

I had been first introduced to the idea of declarative syntax when using Angular JS. From what I understand, the idea is that you say, "do this" instead of "in order to do this, do this, this and ...
2
votes
1answer
76 views

Abstract algebra and programming languages

Quite often, I stumble upon abstract algebra concepts like initial algebra, free algebra, and similar while reading papers on programming languages. For instance, in papers on algebraic data types, ...
1
vote
0answers
32 views

What is effect typing useful for when all global effects already have to be in the IO monad?

This paper adds effect handlers to a number of languages, including Haskell - and also adds a form of effect typing to Haskell. But what's the point of the latter? I know that effect types can be used ...
22
votes
8answers
3k views

What determines the “speed” of a programming language?

Suppose a program was written in two distinct languages, let them be language X and language Y, if their compilers generate the same byte code, why I should use language X instead of the language Y? ...
4
votes
2answers
38 views

Are class methods closures?

In the wiki article about closures one can read: closure ... is a function or reference to a function together with a referencing environment At the same time in the wiki article about class ...
2
votes
1answer
26 views

Monotone Frameworks: Transfer functions for flow edges instead of labels

So, in generic program analysis, we have a lattice $L$ with a join operation $\sqcup$, program with statements labelled, and for each label $b$, a transfer function $F_b : L \rightarrow L$. The goal ...
4
votes
1answer
93 views

What is the difference between assignment, valuation and name binding?

I read that Name binding assigns some value (data/code/expression) to an identifier. Assignment and valuation seem to do the same thing. It is confusing. Can I just tell that free variable is one, ...
4
votes
2answers
93 views

How to bridge theory and implementation for while loops?

I'm working on my own little programming language for educational purposes, and I've run into a little bit of a problem. There are a few different solutions for it, but all of them seem inelegant - ...
7
votes
1answer
86 views

What is a non-contrived example of static type-checking being too conservative?

In Concepts in Programming Languages, John Mitchell writes that static type checking is necessarily conservative (overly strict) because of the Halting Problem. He gives as an example: ...
0
votes
2answers
26 views

R Integer Overflow [closed]

I have a quick question. I have a huge database and I am try to sum all the elements in a column of my data base but there are over 100,000 values and I consequently, get integer overflow (returns ...
1
vote
6answers
285 views

Computer Program vs. Algorithm

It's said that a program include algorithms, however if we refer to their definition, an algorithm is a sequence of instructions written to perform a specified task and a computer program is also a ...
-2
votes
2answers
96 views

What Programming Languages a Computer Science Engineer must learn [closed]

During my college I studied C/C++, C#.Net and ASP.Net. Now one my friend suggested me to learn Python & MATLAB also. He wasn't much specific why to learn these languages, He said it would be ...
2
votes
2answers
123 views

Is 95% of code really non-semantic fluff? [closed]

According to A Study of Wheat and Chaff in Source Code, 95% of code is "chaff", or "non-core functionality", whatever that means. Is this really a sensible study? Does the IT World article correctly ...
3
votes
1answer
63 views

When was the terminology *tracing collector* introduced to denote both mark-and-sweep and copy collectors

Automatic storage reclamation, aka garbage collection, comes in two main families, sometimes cooperating: the reference count collectors and the tracing collectors. I may develop specifics of each ...
2
votes
1answer
43 views

Proof via induction for small-step semantics

I'm doing a course in Computer Programming Languages and I'm trying to prove the following (roughly following Pierce's Types and Programming Languages book): if $t \rightarrow^* t'$ then $if\; t\; ...
5
votes
4answers
898 views

Can we write algorithms without conditional statements?

Regarding turing completeness, i read that for a language/machine to be turing complete it is required that it has some sort of conditional. Consider the factorial problem, we would typically define ...
10
votes
5answers
280 views

Why is the object destructor paradigm in garbage collected languages pervasively absent?

Looking for insight into decisions around garbage collected language design. Perhaps a language expert could enlighten me? I come from a C++ background, so this area is baffling to me. It seems ...
-1
votes
1answer
25 views

Programming Languages Grammar Ambiguity [closed]

I don't know if it is the right site to ask this. But we're studying about ambiguities of grammar. Including left most derivation and right most derivation. We are given the problem: ...
2
votes
1answer
32 views

Most frequently tools or programming language for implementation text processing and nlp algorithms in academic papers and journals [closed]

I want to prototype and try some idea (some algorithm) in the field of text processing and nlp and if the results was good I want to publish some paper or journal article about that. I am familiar ...
8
votes
2answers
180 views

What is the difference between variables and pointers?

Whist reading an article outlining differences in OO and Functional programming I came across function pointers. It has been a while since I completed my Computer Science degree (2003) and so I looked ...
2
votes
2answers
111 views

What do I need to study in order to understand and design a programming language? [closed]

What do I need to read in in order to : understand the specs of an already made programming language Design a programming language Design a compiler and assembler for that language make an ...
0
votes
2answers
77 views

How to learn computer science the right way [closed]

I looked through the sites and this seems to be the best place to ask this question. I am sure it has been asked 10000 times but I am looking for a tailored answer to me and my situation. I currently ...
3
votes
0answers
49 views

In 1968 there were more than 3000 programming languages known, how large would this number be today? [closed]

Alan Kay stated in one of his talks that there was a paper in 1968 that listen at least 3000 programming languages that were known in the year 1968. What would be an unsientific but "educated guess" ...
5
votes
2answers
135 views

Is there an equivalent of lambda calculus for object oriented languages? [duplicate]

Lambda calculus serves as a foundation for all sorts of functional languages and its various extensions are compiler targets for languages like Haskell, ML, etc. So what is the equivalent for object ...
18
votes
3answers
2k views

Can regular languages be Turing complete?

I was reading about Iota and Jot and found this section confusing: Unlike Iota, where the syntactic tree for a string can branch either on the left or on the right, Jot syntax is uniformly ...
1
vote
1answer
33 views

Haskell: implementation issues of some basic features [closed]

I'm taking a "Programming Language: Design and Implementation" course and our professor asked to make a case study about: Haskell programming language. In this case study he asks to make a report ...
3
votes
1answer
163 views

Is There a Programming Language That Embraces Globals?

All programming languages have globally defined symbols. While best practices invariably abjure their use as mutable entities the philosophy of what is mutable and what is not mutable is highly ...
2
votes
2answers
49 views

Second order function formalization

I need to work on a optimizer for a language whose operator are second order functions. They are the well known ones filter, map, reduce, fold, foreach etc. etc. I need to formalize as much as ...
2
votes
0answers
30 views

Understanding a paper on polynomial recursion in all finite types

So I wasn't sure weather or not this counted as "research level" or not but I figured it wasn't so I decided to post it here. There is a paper by S. Bellantoni et al. called "Higher Type Recursion, ...