Tagged Questions

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

learn more… | top users | synonyms (1)

-1
votes
0answers
13 views

Is there any NLP-oriented programming language? [on hold]

Is there any NLP-oriented programming language? Even for small simple tasks like: Open/Close application Type something Navigate to webpage Click mouse somewhere In which the "Programmer" would ...
0
votes
0answers
7 views

Using HashMap to associate letters to numbers [on hold]

I'm trying to use Hashmap to make a dictionary of 26 key-value pairs. I'm trying to link each letter of the alphabet to a number, and then iterate through a string and letter by letter print the ...
0
votes
0answers
24 views

Are if statements avoidable is we define a program according to explicit state transitions? [duplicate]

This question occurred to me some time ago when I was thinking about whether or not if statements are fundamental in computation. Consider a program that manages a ...
3
votes
4answers
65 views

Are if statements unnecessary if a program is represented as an explicit state machine?

This question occurred to me some time ago when I was thinking about whether or not if statements are fundamental in computation. Consider a program that manages a ...
-1
votes
0answers
13 views

How would one go about creating a method that moves/animates an object from a text file? (java) [closed]

Assuming the text file looks like this: GO 10 20 5 where 10 is the x coordinate, 20 the y coordinate, and 5 being the amount of time (in seconds) to move the object to the desired x-y coordinate.
-1
votes
0answers
12 views

Write a Special Code on C# [closed]

I want to a Monitoring software for my user in one company. how i can wrote a program such a way non user be able to stop it in client? i.e, without any technique couldent stop my program or service? ...
1
vote
1answer
60 views

Interactive example of Dynamic scoping and evaluation order of expressions

Given the following (arbitrary language, although I think it is close to Algol 60) program: ...
6
votes
3answers
225 views

What problem cannot be solved by a short program?

BACKGROUND: Recently I tried to solve a certain difficult problem that gets as input an array of $n$ numbers. For $n=3$, the only solution I could find was to have a different treatment for each of ...
0
votes
1answer
18 views

Principles of Programming Languages: Understanding Judgements

I am taking a principles of programming languages class right now and am trying to understand the following judgement form. ...
1
vote
1answer
25 views

Isn't software needed from programs to run? [closed]

I am a student who has entered a game programming competition called FBLA at school, and I sent them an email because I had a few questions about how the competition is ran. The main question I had, ...
-1
votes
1answer
33 views

What are activation records?

What are the open activation records of a recursive algorithm ? Edit: Activation records are the number of times that we call a function that is not finished yet. Correct? So we can find the number ...
0
votes
2answers
38 views

Possible to develop a game using assembly language? [closed]

I am wondering what it takes to develop a game in assembly language. For example, what are the limitations or advantages from using assembly language in game development? Also, are there any ...
0
votes
1answer
39 views

What is shell expansion in programming language theory?

From Bash Reference Manual Expansion is performed on the command line after it has been split into tokens. There are seven kinds of expansion performed: brace expansion tilde expansion ...
-1
votes
1answer
37 views

parameter and variable in programming languages

From Bash Reference Manual, a parameter: A parameter is an entity that stores values. It can be a name, a number, or one of the special characters listed below. A variable: A variable ...
0
votes
0answers
7 views

Drawing a pyramid on MATLAB [migrated]

I want to draw this figure on Matlab (without the bubbles)! I wrote following code : ...
3
votes
1answer
70 views

How is IO a monad?

I am learning the Haskell programming language. From what I am reading, Input/Ouput (IO) raises challenges for Haskell's purity, since by definition we are interacting with the outside world. From ...
13
votes
6answers
2k views

What is the Relationship Between Programming Languages, Regular Expressions and Formal Languages

I've looked around the net for an answer to this question and it seems as if everybody implicitly knows the answer except me. Presumably this is because the only people who care are those who have had ...
-1
votes
2answers
86 views

Are “data structures” part of algorithms or of programming languages?

I often heard that "program = algorithm + data structure". But I notice that It seems to me that a data structure is (or may be) just a data type or extension thereof. Is it correct? But a data ...
5
votes
2answers
56 views

Which fixpoint is Haskell list type?

Let's say that lists are defined as List a = Nil | Cons a (List a) Then, in Haskell is List x the greatest or least fixpoint? ...
5
votes
0answers
62 views

Convert source code from one language to an other? [closed]

Say I have a full application written in Python. Is it feasible to convert the source code into C? If such a tool doesn't exist, why doesn't it? What are the constraints? I ask this since I have been ...
-2
votes
1answer
37 views

What is a forwarding pointer? [closed]

I heard this terminology used today and haven't come across it before, could someone please explain? Are there any other terms/names that describe this concept?
1
vote
1answer
34 views

Weakening and Contraction

Wikipedia says that weakening is a structural rule where the hypotheses or conclusion of a sequent may be extended with additional members and that contraction is a rule where two equal (or unifiable) ...
1
vote
0answers
29 views

Pursuing a career in CS or related fields? [closed]

I am currently a Biochemistry major with a mathematics minor. My original plans were to go on to medical school and become and anesthesiologist but, that vision has been getting pretty cloudy for me. ...
36
votes
7answers
6k views

What properties of a programming language make compilation impossible?

Question: "Certain properties of a programming language may require that the only way to get the code written in it be executed is by interpretation. In other words, compilation to a native machine ...
0
votes
0answers
56 views

LALAR vs SLR Table for Given SLR Grammar

i'm so glad that ask my first question on my favorite site. Infact i ran into multiple choice question in recent exam on Compiler Course. Suppose T1, T2 is created with SLR(1) and LALR(1) for ...
2
votes
1answer
90 views

Why multiple return values is not a common thing?

I would like to ask a question about multiple return values, why this construct is not preferrable in programming languages (conceptual and/or technical difficulties). I've heard something about stack ...
4
votes
2answers
112 views

what would be the drawbacks of lecturing two programming languages simultaneously?

One colleage came with the idea/comment that it would be useful to lecture two programming languages, eg. Java and Scheme, at the same time while lecturing an Introduction to Programming course aimed ...
0
votes
1answer
47 views

What is the difference between symbol and enumerated datatypes?

I wonder what differences and relations are between symbol and enumerated types? A symbol is a primitive datatype whose instances have a unique human-readable form an enumerated type is a ...
-1
votes
1answer
58 views

Implementability of a (abstract) data structure/type? [closed]

Do people consider the implementability of a (abstract) data structure or a data type, just like people do for implementability/computability of an algorithm? By implementability, I mean if a ...
4
votes
0answers
52 views

Are there specific rules for programming languages applicable to Quantum Computers?

What would be the requirements for programming languages that are used for quantum computers? Do standard procedural languages with their constructs be sufficient, and succinctly capture the computing ...
2
votes
4answers
113 views

Why isn't there a .= operator? (or ->= etc)

Considering how often we do: ...
4
votes
2answers
51 views

Incorporating newline-as-statement-terminator heuristics into context-free languages

Several block structured languages (Scala, Go, Ruby, Julia, Quorum, ...) use semicolons as statement terminators, but allow newlines instead of semicolons under certain circumstances. My question is: ...
1
vote
2answers
66 views

Call‑by‑name will succeeds where call‑by‑value may fails: some example cases?

I've landed to SML pages, comparing call‑by‑name and call‑by‑value, asserting the former always succeed while the latter may fails. As this seems counter intuitive to me, I feel at least an example ...
1
vote
1answer
55 views

Programming languages for genetic engineering [closed]

I'm interested in getting a Ph.D. and would love to work on a project such the GEC project at Microsoft Research, which studies the application of programming languages for synthetic biology and ...
2
votes
1answer
27 views

Ordering of conditions in multi-way conditional constructs [closed]

Most programming languages provide multi-way conditional constructs (like cond in Lisp, guards in Haskell, etc) that allow one to define program behavior according ...
1
vote
2answers
147 views

What are the definitions of syntax and semantics?

For a formal language $L \subseteq \Sigma^*$ over an alphabet $\Sigma$. From https://proofwiki.org/wiki/Definition:Syntax The syntax of a formal language is its structure, and is specified by a ...
6
votes
1answer
75 views

Tag-free garbage collection for object oriented languages

I'm looking around for a good garbage collection technique for my language and found this paper, where Benjamin Goldberg describes a garbage collection technique for strongly typed languages, which ...
0
votes
1answer
350 views

High Level Programming Languages vs Block Programming Environments [closed]

I am looking for the opinions of more experienced programmers as to the effectiveness of writing programs in Block Programming Environments such as Scratch or App Inventor as opposed to High Level ...
1
vote
0answers
78 views

How does one guarantee that the commutative, associative and distributive properties hold for a type?

While most main stream programming languages allow for user defined types that can have the following properties: associative commutative distributive the only way I know of that this can ...
-4
votes
1answer
39 views

Understanding the symbolic computation of a derivative [closed]

I've been watching the sicp videos lectures by Hal Abelson and Gerald Jay Sussman and am lost on lecture 3b. Can someone explain to me what's going on in this video? ...
2
votes
0answers
46 views

Are there models of type theory that allow the real numbers to be a type?

Do there exist models of type theory that allow types to contain an uncountable number of inhabitants? Traditionally type theory seems to be swirled in with computable programs as constructive proofs ...
6
votes
7answers
301 views

Language for teaching basic programming

I'm interesting in teaching programming to middle school students. I'd like a programming language with the following criteria: Simple - pared down to the absolute minimum needed to support ...
0
votes
1answer
86 views

Why does Pascal have a high code density?

The plots in http://blog.wolfram.com/2014/06/04/how-the-wolfram-language-measures-up/ seems to indicate that Pascal has a relatively high code density. What features of the language makes it so? ...
4
votes
2answers
316 views

Why isn't the Swift programming language type inference more aggressive?

Couldn't the type inference in Apple's new programming language Swift had been done more aggressive? For instance why can't the return type of a function be deduced? ...
0
votes
0answers
25 views

Type inference example?

In my programming languages course we are reviewing type inference, i didnt get very well how to make this task. I all ready search at the bibliography of my course (PLAI by Shriram krishnamurthi) ...
0
votes
0answers
14 views

How to apply the unification algorithm to a racket function

In my programming languages course we are reviewing unification algorithm by hand. The TA can't solve some examples of how to apply the unification algorithm to the ...
2
votes
0answers
36 views

Defunctionalization and known arity function calls by pointer

Defunctionalization is nice for higher order functions where it is completely necessary to avoid runtime support, but in some cases it's favourable to use function pointers instead (since they don't ...
3
votes
0answers
90 views

Is there any programming system that enables reversible computations?

Better explained with examples, I need a programming system with the following characteristics: ...
2
votes
2answers
70 views

Is there a name for defining recursive functions as an infinite list of input/output pairs?

Recursive functions are usually defined by directly calling a function inside its own body. Nat = Z | S Nat double Z = Z double (S x) = S (S (double x))) What ...