The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [programming-languages]

Questions related to design, implementation, and analysis of programming languages. NOT for questions about how to program, which are off-topic on this site.

115 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
0answers
33 views

How to create model for a powerful language whose programs are guaranteed to terminate?

I'm creating a powerful regular expression matching system that can be augmented by adding small microprograms to deterministic finite automaton (DFA) states. The microprogram solves the big bang ...
1
vote
0answers
41 views

Sequential valid programs to find novel outputs?

I have: A programming language (P). Programs should take no input and produce a sequence of integers as output. A way to enumerate all valid programs in this language (R) in a way that each program ...
1
vote
0answers
25 views

What are $(S,\Sigma)$-CCCs?

I was reading this and I was trying to understand the definition of $(S,\Sigma)$-CCC. The first requirement says: a mapping [[_]] : S → |C|, associating some object [[s]] ∈ |C| to any s ∈ S; ...
1
vote
0answers
51 views

Why the name static and dynamic in static and dynamic scoping

I am wondering, from where static and dynamic scoping got their names. After understanding the concept of static and dynamic scoping in C, what I assume is that whenever we failed to find out the ...
1
vote
0answers
48 views

Can I call my library an interpreter?

I am working on tiny programming language (for our specific tasks). It's a script language. It looks like a library for C++ that can execute a code of this language. This library parses a source code ...
1
vote
0answers
67 views

Best way to make the jump from programming to computer science

I have decent enough experience with programming to be able to tackle most things but I want to know how you recommend making the jump from just programming to computer science. I still have a couple ...
1
vote
0answers
35 views

Good pointers to learn foundations of Program induction and Program synthesis

I was interested in learning more about program induction and program synthesis. I was especially interested in learning about how to form program from data for example. My background is in ...
1
vote
0answers
141 views

'if' and 'while' statements within a SIMD architecture and its memory architecture

I am doing some past exam papers and I found two interesting questions which I cannot answer due to them not being extensively covered in the lecture notes given to me by my lecturer. The questions ...
1
vote
0answers
51 views

Explain static and dynamic binding without Overloading and Overriding?

few days ago I attended a interview, and the interviewer asked me a very common but strange question. Explain static and dynamic binding without using method overloading and method overriding ? I ...
1
vote
0answers
25 views

Creating a self-affine fractal on L-systems

Hi I would like to create a self-affine fractal on L-Systems. The axiom I have created is FF-GGG-GG-GGG++GGG+GG-GGG+GG+GGG+FF++ffGG+GGG+FF+GGG which creates the image below At each stage I would like ...
1
vote
0answers
105 views

Is an inputless program redundant?

Are there useful programs that don't take inputs from a user, environment etc. such as key input, or the current time? A program that computed/printed out predefined data could be turned into a file, ...
1
vote
0answers
59 views

Languages with Multiple Arbitrary Return Values

I am designing a DSL for writing numerical simulations. I am working on a specific issue related to returning values from functions, and I am wondering if any other existing language solves the same ...
1
vote
0answers
241 views

Implicitly typed vs untyped?

What are the differences between an implicitly typed programming language and a untyped programming language? Let me explain the above question and what I have thought about it. My question ...
1
vote
0answers
1k views

What does deep binding mean for static scope?

When I self-study "Programming Languages: Principles and Paradigms, by Maurizio Gabbrielli, Simone Martini", I have a question: what does deep binding mean for static scope? I learned the concepts ...
1
vote
0answers
60 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 ...
1
vote
0answers
673 views

Where does the Dynamic Link point to on the activation record

I'm a bit confused as to wear exactly the dynamic link points to on the activation record. I understand that it points to the 'top' of the instance of the callers activation record but I am unsure of ...
1
vote
0answers
55 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 ...
1
vote
0answers
203 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 ...
1
vote
0answers
433 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 be ...
1
vote
0answers
39 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 ...
0
votes
0answers
9 views

Manage nested recursions in the design of a concatenative language interpreter

I'm in the designing of an interpreter for a stack based concatenative language, and I'm currently stuck with a problem about recursion of some of my concatenative program to calculate factorial: <...
0
votes
0answers
14 views

Do Rank-1 (prenex) polymorphism and Predicative polymorphism mean the same?

https://en.wikipedia.org/wiki/Parametric_polymorphism says: Rank-1 (prenex) polymorphism In a prenex polymorphic system, type variables may not be instantiated with polymorphic types.[4] ...
0
votes
0answers
15 views

What are the relations between these two descriptions of let polymorphism?

In Types and Programming Languages by Pierce, there are two descriptions of let-polymorphism. Sec23.8 Fragments of SystemF on p359 says This has led to various proposals for restricted fragments ...
0
votes
0answers
11 views

What are the difference and relation between type checking and type reconstruction?

In Types and Programming Languages by Pierce, ML-style let-polymorphism was first described by Milner (1978). A num- ber of type reconstruction algorithms have been proposed, notably the clas- ...
0
votes
0answers
9 views

Can two type expressions in different kinds have subtyping relation and equivalence relation?

In Higher-order bounded quantification ($F^ω_{<:}$), introduced in Ch31 in Types and Programming Langauges by Pierce, its subtyping and equivalence rules are: Does subtyping relation only exist ...
0
votes
0answers
29 views

Is `→` a type operator?

In Types and Programming Languages by Pierce, The level of types contains two sorts of expressions. First, there are proper types like Nat, Nat→Nat, Pair Nat Bool, and ∀X.X→X, which are ...
0
votes
0answers
23 views

Does λ→ have type operators?

In Types and Programming Languages by Pierce, Ch11 Simple Extensions introduces λ→ as the simply typed lambda calculus with simple extensions, and introduces <...
0
votes
0answers
21 views

Is the language “untyped arithmetic expressions” in Types and Programming Languages not Turing complete?

In Types and Programming Languages by Pierce, is it correct that the language introduced in Chapter 3 Untyped Arithmetic Expressions is not Turing complete? Because it doesn't provide recursion. the ...
0
votes
0answers
14 views

How can we directly reaching inside and looking at the state of a partially existential object?

Types and Programming Languages by Pierce says in Section 26.5 Bounded Existential Types, about partial existential objects implemented in terms of bounded existential types: We can make a similar ...
0
votes
0answers
24 views

What are the differences and relations between a type constructor and a type operator?

What are the definitions of a type constructor and a type operator? What are their differences and relations? I think a type operator is a function whose parameters are n types and return is a type. A ...
0
votes
0answers
43 views

Why algebraic semantics of programming languages have died out and have not used today?

Algebraic semantics is one type of semantics that uses algebraic expressions for connecting the formal descriptions of initial and final states of some operation of some operation that is defined in ...
0
votes
0answers
25 views

Mutually contradicting rules in Prolog

What will happen in a Prolog program, if I set two rules/facts which contradict each other.. will it go with the rule/fact that appears first.. or it will show an error?
0
votes
0answers
15 views

Languages with Static Upper Bounds for Resource Consummations

For Topics related to Blockchains and Smart Contracts, I'm developing a programming language that has the property that it is possible to calculate an upper bound on the consumed resources of a ...
0
votes
0answers
56 views

Converting Turing machine into the source code in industrial programming language?

Are there methods how to convert Turing machine (e.g. neural Turing machine or other rigorous Turing machine) into the source code/program that is written in some industrial programming language like ...
0
votes
0answers
14 views

In normative order evaluation, is there distinction between call by value, call by reference, call by sharing, etc?

Consider different ways of evaluating a procedure call and its arguments. Essentials of Programming Languages says All the parameter-passing mechanisms (natural parameter passing, call by value, ...
0
votes
0answers
13 views

Can the value model for variables only be used together with static typing, not with dynamic typing?

There are two models of variables: the value model (e.g. variables in C) and the reference model (e.g. variables in Python). There is also a distinction between static typing and dynamic typing. Can ...
0
votes
0answers
22 views

SICP: applicative or normal order evaluation

I'm trying to solve Problem 1.5 from SICP book. Consider the following definitions: (define (p) (p)) (define (test x y) (if (= x 0) 0 y)) (test 0 (p)) The ...
0
votes
0answers
67 views

Regex to match number ranges less than a certain number

I'm trying to write some code to match numbers below certain bounds. I would much appreciate nay help somebody could give, I'm pretty lost with this one... NB. I've checked the forums and can find ...
0
votes
0answers
17 views

Does formal specification of UX needs special language apart from the general specification languages?

I am fan of Alloy and CASL specification languages and my question is - what is the common practice regarding the formal methods in UX? Does UX require distinct specification languages? Generally one ...
0
votes
0answers
28 views

Law and contracts as “programs” executed by human brains

Note: This question is NOT about using computers/AI in legal practice. I found a paper (pdf here) that makes the analogy between law and computer programming: Laws and contracts are programs/...
0
votes
0answers
20 views

Declarative vs Relational Programming

I've searched a lot on the web, and I found no material that expresses clearly and in simple terms what is the difference between declarative and relational programming. Can you help me ?
0
votes
0answers
32 views

Trying to determine Fixed Points

I'm basically trying to solve 4.2 (Taken from Semantics with Applications) As I see it, the functional F will be defined like so: ...
0
votes
0answers
51 views

Mathematical resource material accompanying TAPL

I'm currently reading Types and Programming Languages by Benjamin C. Pierce and just arrived at chapter 21 Metatheory of Recursive Types. Prior to this chapter I found the book challenging but ...
0
votes
1answer
55 views

How to draw a parsing tree according to syntax diagram?

I would really appreciate if someone can explain the syntax diagram itself and can help to build the parsing tree.
0
votes
0answers
30 views

What are the guiding design principles for designing programming languages that allow Sketching?

I wanted to implement and design my own programming language that allowed sketching, like Combinatorial Sketching for finite programs. I was reading through the paper but it was unclear to me if there ...
0
votes
0answers
61 views

Why is Combinatorial Sketching for Finite programs possible?

I was reading Combinatorial Sketching for Finite Programs and wanted to understand why synthesis of the sketching language was possible/feasible. As far as I understand a partial program is ...
0
votes
0answers
31 views

What is an intuitive way to understand the definition of Curry and Uncurry in Categorical Language?

I was studying the definition of currying and uncurrying using Category Theory from these slides. The answer and the proof on slide 19 makes 100% sense to me however, the definitions seem to come out ...
0
votes
0answers
24 views

Concurrency and non deterministm

I was introduced in concurrency programming this morning. I haven't understood why "non deterministm" is a fundamental aspect of cuncurrenty programming. What i think is that, since there is a ...
0
votes
0answers
34 views

Computational cost of using dictionary in floating point opertations

I would like to know the computational cost of using/accessing a dictionary. This should depend on the length of the dictionary. Say a dictionary $D$ has $n$ elements. What would be the cost of ...
0
votes
0answers
63 views

How can Interpreter run JIT Compiled Code

I do not understand how a program such as an interpreter can run and create code "on the fly" to run. Can someone help me understand what such a program would have to do in order to function? I'm ...