New answers tagged

0

https://www.longdom.org/articles/reverse-engineering-turing-machines-and-insights-into-the-collatz-conjecture.pdf is one initial effort to do this for some subclass of Turing machines. Actually there is fantastic culture about it http://bluesky-home.co.uk/. These works almost exclusively cite the author itself, that indicates how undeveloped this field is. ...


1

That website uses a different notation than what you assumed. This would be the correct input: S -> A S | b. A -> S A | a. You entered AS (and SA) which it does not recognize as A followed by S, but as a single nonterminal named AS. With that input it correctly says that the language is not $\text{LL}(1)$.


0

For most of these questions, the Runtime Environment as it seems to be described in your book is more easily understood by comparing a low-level language like C, to a VM (Runtime Environment) language like Java. How does compiler execute the code, it is only supposed to generate the intermediate code right? Your quote doesn't say the compiler executes ...


2

Ignore recursion for the moment, and pretend that a recursive call is just like any other call. Then the solution is easy: all local variables are spilled to the stack across calls, including the recursive call. So yes, if there is deep recursion going on, most of the local variables will reside on the stack most of the time. Every platform (operating ...


0

Since $A\to .Ay$ is in the state constructed for $GOTO(0, x)$, $A\to .A(y)$ and $A\to .(y)$ are also in that state. These combine with the other items for the same productions, which have lookahead $z$.


0

(Your question seems to be about concepts and terminology. The meaning of termini depends on context - the quote is from a compiler writers' book. Not only are the authors entitled to a "compiler centric" view of things: that perspective is to be expected.) There are at least two "CS" interpretations to runtime environment.  One is the process/OS level - ...


1

Since a user program does not run on kernel mode, it must make system calls which perform I/O operations. Operating Systems have libraries whose code does system calls. In addition, Operating systems might have libraries whose code does not do system calls but perform some other functionality needed by user programs. So, a user program at some point must use ...


0

It bears repeating that the algoritm used is most important. An example might be you writing your oen bubble sort on a million records in the worlds fastest language. Compared it to using a really slow language with a built in really good sort. Your fast language will be mighty slow in comparison.


0

Simple answer is, the closer a language is to the hardware the faster it would be. The more a language depends on libraries and other functions to do it's tasks the longer it takes for program execution in that language.


1

Expanding on @vonbran's answer, here is why the grammar is mbiguous. Say you have a statement of the form if (expr) if (expr) stmt else stmt , then the else can belong to either ifs.


1

As the name indicates, the parse tree is generated top-down. Specifically, you start with a place-holder node for the start symbol. Each time you predict a production, you fill in the placeholder with the right-hand side of the production, where each symbol is represented by a placeholder. Each time you shift over a token, you fill in the placeholder with ...


Top 50 recent answers are included