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

learn more… | top users | synonyms (1)

5
votes
0answers
52 views

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

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 ...
-3
votes
0answers
26 views

Use newton's raphson method write a C program to determine the approximate root of x [closed]

a) Using newton ’ s raph son method write a C program to deter m i ne the approximate root of x from the equation , if x 3 = 20 for three iterations assuming tha t the start guess value of x0= 3.0 [ ...
-3
votes
0answers
12 views

How can I display multiple markers on Google API map using PHP, Javascript and MySQL database [closed]

I am developing a custom Google map with my location's coordinates and names stored in MySQL database. now I would want to display all these locations on my map using PHP, Javascript and Google Map ...
-2
votes
1answer
36 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
31 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. ...
34
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
8 views

How to exclude Code snippets from Microsoft Words spell check [migrated]

I am writing on an computer scientific report and I'm really tired of Word 2010 always switching between languages (code in english, text in german) and marking all my code red just because there are ...
0
votes
0answers
51 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
85 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
111 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
45 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
55 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
110 views

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

Considering how often we do: ...
4
votes
2answers
48 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
62 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
54 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
23 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
131 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
72 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
158 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
74 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
43 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
291 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
274 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
24 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
11 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
88 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
69 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 ...
1
vote
0answers
24 views

Is VHDL a description language for a Boolean circuit or are both concepts unrelated

I am looking for a way to translate basic c programs (subset of c or java or some declarative programming language) to a Boolean circuit. I know that Turing machines are reducible to Boolean circuits ...
1
vote
1answer
91 views

Operator overloading: Java vs. Python

Why operator overloading was included in Python and not in Java? How does one decide to include or exclude operator overloading in a programming language? It is said here that operator overloading is ...
0
votes
0answers
41 views

Proving the small-step semantics of factorial program

I am given the following command $C$: $y:=1;$ while $\neg (x=1)$ do $y:= y*x;$ $x:= x - 1$. I have to show that $[\![ C ]\!]_s(s) = \{x \mapsto 1, y \mapsto s(x)!\}$ if $s(x) \geq 1$ and undefined ...
1
vote
0answers
24 views

Is object oriented programming fundamentally different than imperative programming? [duplicate]

I have been using C for a while, for some reasons I learnt C++. I can't see why object oriented is a "new" feature. For me an object is just a structure, and a set of functions which have a pointer ...
1
vote
2answers
51 views

Is there a decidable algorithm to compose two well-behaved recursive functions that work on a recursive tree datatype?

Let the following datatype be defined: data T = A | B T | C T T That is, B, B T, B (B T), C A A, C (B T) A and so on all are ...
1
vote
1answer
48 views

Small-step semantics: for-loops

I'm trying to construct the small-step semantic rules involving the for-loops, but I can't find anything about it in the literature (only about while-loops). I was wondering if anyone could help me ...
0
votes
1answer
96 views

Are Java and C# also purely interpreted languages? [closed]

I was wondering about the nature of these managed languages i-e since c# and java both are converted into intermediate language and byte code respectively, and are interpreted by their respective ...
2
votes
0answers
25 views

About computer science and category theory [duplicate]

I read that Category Theory has alot to do with how programs and information can be organised.Can Category theory simplify various programming strategies? If a specific Category is represented as a ...
-1
votes
2answers
90 views

Mathematical function vs Computer program

In mathematics , an $n$-ary relation is subset of cross product on $n$ sets took under consideration. Let us take $A_1,A_2,A_3 \cdots A_n$ be the n sets. Then relation $R \subseteq A_1\times ...
1
vote
1answer
51 views

Can Java be accurately described as statically and dynamically typed?

Java seems to be categorized as a statically-typed language [1], but I'm wondering if it would be accurate to describe it as generally statically-typed but having some dynamic typing because of the ...
0
votes
2answers
203 views

How does an operating system implement the C library?

I have an idea of how a C program is turned into machine code by the compiler. I also know how the processor processes the instructions (https://www.youtube.com/watch?v=cNN_tTXABUA this video has a ...
1
vote
2answers
867 views

Writing programs with a block programming environment vs. Writing programs using high level prgramming language [closed]

I'm a GCSE Computing student and I've been asked to compare writing programs in a block programming environment (I think this means using programs such as Scratch or App Inventor but I'm not entirely ...
1
vote
1answer
66 views

Are instructions defined as expressions with side-effects? [closed]

Can we define instructions as expressions with side-effects?
1
vote
1answer
36 views

Variable programs and variable data

I'm reading "Sets for Mathematics" by Lawvere, and he uses the following metaphor at the end of section 1.3: "we will see...how any abstract set F of the right size can act as mappings between given ...
0
votes
1answer
435 views

What is pass-by-value-result and its advantage and disadvantage? [duplicate]

I have searched on Google, but I can't quite understand what is pass-by-value-result. What is the advantage and disadvantage of using pass-by-value-result? If I have a program code like this, what ...
2
votes
0answers
104 views

Which programming language is used at the Large Hadron Collider? [closed]

First off I am new to computer science (first semester) and do not know anything about physics, so I am appologizing up front for this not very scientific question. I've been wondering how data is ...
4
votes
1answer
144 views

How are REGEXP implemented in programming languages?

Is there a good general paper about the interpretation or compilation of REGEXP in programming languages for pattern matching, with or without variables? I am not looking for a quick explanation about ...