The tag has no wiki summary.

learn more… | top users | synonyms (1)

0
votes
0answers
68 views

SLR(1) vs LALR(1) when we use SLR(1) Grammar [closed]

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
2answers
129 views

Would it be possible for a compiler to convert a recursive sum into the average formula?

def sum1(n): if n==0: return 0 else: return n + sum1(n-1) def sum2(n): return n*(n+1)/2 A compiler can not convert ...
-4
votes
1answer
123 views

Fermat's last theorem and the LLVM compiler [closed]

The following blog: http://blog.regehr.org/archives/140 discusses how the LLVM compiler seems to prove that Fermat's last theorem is false by showing that the compiler optimizes the $while(1)$ ...
0
votes
0answers
26 views

Resolving ambiguity in an LALR grammar with empty productions

I'm working on an LALR grammar for a constrained Algol-ish kind of language. I'm having a problem with my Procedure definitions. I have the constraint that a Procedure is any number of variable ...
9
votes
1answer
152 views

Program Minimization

Circuit Minimization is the problem to minimize the size of a given circuit. Is there anything similar for general programs? In particular my question is - Do there exist algorithms to minimize the ...
4
votes
1answer
124 views

Is it possible to create an algorithm-aware optimizer?

I've recently implemented a physics system where each object has to interact with eachother. It consisted of, pretty much, the following algorithm: ...
3
votes
1answer
55 views

Compiler Optimization: How do you automatically fuse conditionals into the loop index?

Let's say that you have some loop for(i=0;i<n;i++){ if(i > 3 && i < 8){ p(i); } } How would I go about automatically fusing that into ...
1
vote
1answer
120 views

How can an inherited attribute be simulated using a synthesized attribute?

Is it possible to simulate an inherited attribute using a synthesized attribute? For example, can the inherited attribute SYMTAB used in normal code generation modules be simulated using a synthesized ...
7
votes
3answers
347 views

Can one automate algorithmic analysis?

Has anyone thought about the possibility of a programming language, and a compiler, such that the compiler can automatically do worst-case asymptotic analysis? The use case I have in mind is a ...
3
votes
2answers
217 views

Is compiler for dependent type much harder than an intepreter?

I have been learning something about implementing dependent types, like this tutorial, but most of them is implementing interpreters. My question is, it seems that implementing a compiler for ...
2
votes
1answer
166 views

Monotonicity in data flow analysis

I am studying program analysis and synthesis, I was reading a presentation about some data flow analysis. I can't seem to understand why $$\bigcap_{s'\in\text{pred (s)}}\text{Out}(s')$$ and ...
9
votes
1answer
288 views

Literature on alias analysis

I am writing my master's thesis in CS and I am working with alias analysis. The thing that I am interested in is intraprocedural, flow sensitive must- and may-alias analysis for Java-like languages. ...
5
votes
3answers
166 views

Preserving termination when rewriting recursive programs

Powerful program transformations like partial evaluation, deforestation and supercompilation are based on applying three kinds of transformations: Rewrite using axioms, e.g. a+b = b+a. ...
6
votes
2answers
512 views

Certified compiler and optimizations in Coq/Agda

I am interested in verified compilers formalized in Martin-Löf type theory, i.e. Coq/Agda. At the moment I’ve written a small toy example. Therewith I can prove that my optimizations are correct. For ...
5
votes
2answers
155 views

Why do we need PAP (partial aplication) objects in heap?

In the paper “Making a Fast Curry: Push/Enter vs. Eval/Apply for Higher-order Languages” by Simon Marlow and Simon Peyton Jones it is told that a PAP heap object may be created in the push/enter model ...
9
votes
1answer
318 views

What are possible implementations of Haskell's type classes and what are their (dis)advantages?

As far as I know, a Haskell function with type classes constraints is internally compiled to a function with additional arguments that receive dictionaries with the necessary implementations of each ...
6
votes
2answers
463 views

machine learning for code and compiler optimization?

I am looking into ML for generating more efficient code (i.e. compile time and run time heuristics). I have a phd (compilers, hpc), but very little ML experience. I would appreciate any references ...
-5
votes
1answer
945 views

Proof that DFA that accepts string has NFA that accepts reversal of string

I have seen descriptions for an algorithm that can take a regular deterministic finite automata and create a non-deterministic finite automata that is guaranteed to generate the reverse of string ...
19
votes
5answers
667 views

Compiler correctness proofs

I am looking for tutorial material that covers compiler correctness proofs, preferably using denotational methods, at the level of a beginning grad student. Alternatively, do you know of some ...
1
vote
1answer
182 views

How is the iteration space of a nested for-loop containing two sequential nested loops represented?

In a general for loop of the form: for (i = 0, i <= n, i++) { for (j = i, j <= n, j++) ... for (k = i, k <= n, k++) ... } What ...
2
votes
2answers
245 views

Can any language be modeled as LR(k)

If L(G1) is the language that is produced by grammar G1 and G1 is not LR(k) parsable (specifically speaking for k = 1). Does there exist a grammar Gx that is L(Gx) = L(G1) where Gx is LR(1) parsable ? ...
9
votes
1answer
632 views

The Stalin compiler brutally optimizes, but how?

This question was first asked on Stackoverflow, but the question was closed and suggested that it should be moved to cstheory. Since compiler questions are quite rare here, I was not entirely sure. If ...
1
vote
0answers
93 views

Optimal inlining algorithm

I seek an algorithm to optimise the process of inlinling. Is there such an algorithm, or set of such algorithms? Is there an efficient functional algorithm? To be specific assume we have an Algol ...
7
votes
2answers
216 views

Where can I find an elementary small-step structural operational semantics for closures?

Lexical closures are an implementation technique in languages with first-class functions. I'm interested in a simple operational description of function closures. Does anyone know of such a ...
0
votes
1answer
147 views

Describing a grammar and associated parser

In the process of writing a Turing machine simulator, I decided on a machine representation in ASCII that closely mirrors Turing's original machine tables. I am interested in the formal categorization ...
2
votes
2answers
491 views

Equivalence of two basic blocks

My questions: What are other names for this and similar problems and their fields? ("equivalence of varieties in universal algebra", "equivalence of algebraic structures", "rewriting systems for ...
5
votes
2answers
880 views

Brackets expression incremental parsing algorithm

I am looking for efficient and easy in implementation algorithm for incremental parsing of expressions with brackets. Consider the example with expression like "((1)())(2)". Parse tree for that ...
11
votes
1answer
256 views

Has anyone used Pottier and Gauthier's polymorphic defunctionalization in a modular compiler?

Defunctionalization is a program transformation that converts higher-order programs into first-order programs. The idea is that given a program, there are only finitely many lambda-abstractions, so ...
14
votes
4answers
1k views

What's new in compiler optimization techniques over last few years?

I'm interested in optimization of data flow and control flow graphs and in particular more computationally complex. But it will also be interesting to know about the latest inventions in the field of ...
10
votes
2answers
1k views

What are current open problems in compiler theory?

Compiler theory seems to be a pretty vetted subject. What are some open problems or current research happening in the field?