Questions tagged [interpreters]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
12 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: <...
2
votes
1answer
218 views

Datalog Self Interpretation

According to https://link.springer.com/article/10.1007%2Fs001530050135 (Logics that define their own semantics, Imhof 1999) the logic FO[LFP] can define its own semantics, though the proof (of ...
2
votes
1answer
43 views

Is this a proper LL(1) Grammar?

Please take this question with a grain of salt. I'm trying to write a very simple layout engine and wanted to formally create a grammar to parse the input. I stayed up all night researching LL(k) ...
0
votes
1answer
95 views

Is it possible to encode logical expression and interpret it with SQL?

Is it possible without any forms of eval or stored procedures to execute a query, which interprets logical expression, encoded in some way in a table (or two tables)...
1
vote
0answers
53 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 ...
2
votes
1answer
51 views

Are too many function calls bad(as in slows speed performance) for programs written using interpretor-based scripting language(JavaScript, Perl)? [closed]

The interpreters used for running scripting language (i.e., JavaScript, Perl, PHP, etc. ) programs go line-by-line. Isn't it better to Avoid too many function invocations for programs written in said ...
2
votes
0answers
195 views

Practical usage of the λ-calculus self-interpreter and the self-reducer?

I came across the paper: "Efficient Self-Interpretation in Lambda Calculus" by Torben Mogensen, 1994: http://repository.readscheme.org/ftp/papers/topps/D-128.pdf It talks about the intepreter $E$ ...
3
votes
0answers
206 views

How to implement scheme's letrec in a lazy dialect?

In SICP, lazy evaluation is defined as delaying the evaluation of procedure arguments until the actual values are needed. (https://mitpress.mit.edu/sicp/full-text/sicp/book/node85.html) letrec can ...
5
votes
1answer
182 views

Implementing a Compiler with Macros

I've been thinking about embedded languages (domain-specific or otherwise), and in particular the approach where we define a datatype to represent terms of the embedded language, e.g. (in Haskell): <...
3
votes
0answers
96 views

Alternative to a CALL as a composition?

I've seen a numerous interesting abstract machines (i.e. CESK) and evaluators (diverse meta-circular S-expression evaluators, i.e. vau, COLA) and other models (concatenative, SK/Lambda calculus) which ...
1
vote
0answers
108 views

Why Aren't Programs Written In Any Language Just As Fast? [duplicate]

From my basic understanding of computer architecture, a computer understands instructions and a computer program written in a high level language is converted to a set of such instructions for the ...
0
votes
1answer
42 views

How does literals in compiled languages differ from literals in interpreted languages?

A literal is a piece of data which gets its value at compile time. Means: Becomes set at compile time and afterward the value is fixed incorporated into the machine code as a code consisting out of ...
7
votes
1answer
284 views

Reference request: optimizing procedures on lists in dynamic languages by performing safety checks in advance

For my science fair project, I implemented an optimization to Python's sort routine. The idea is to move the safety checks that have to be carried out during each comparison, e.g. type checks and ...
3
votes
3answers
1k views

How can a stack-based VM be Turing-Complete?

I was trying to implement a stack-based Virtual Machine (e.g. like JVM or some early version of Lua) for some benchmarks in order to test its performance against a Register-based VM. I originally ...
6
votes
1answer
96 views

Can Tree Transducers Self-Interpret?

Is it possible for MSO graph/tree transducers to reflect themselves, namely to create an interpreter of tree/graph transducers using tree/graph transducers? If yes, I'll be happy for some design ...
5
votes
2answers
172 views

Implicit complexity and interpretation of total languages

In implicit complexity theory we construct languages that characterize what can be computed in various complexity classes. One major result is Bellantoni and Cook where they show that $FP$ can be ...
4
votes
2answers
448 views

Interpretation in scripting languages

Why is pure interpretation more common for scripting languages compared to programming languages? I mean, why are programs written in a scripting language not converted to machine language and then ...
2
votes
2answers
994 views

What do I need to study in order to understand and design a programming language? [closed]

What do I need to read in in order to : understand the specs of an already made programming language Design a programming language Design a compiler and assembler for that language make an ...
4
votes
0answers
54 views

Substituting “remaining variables” during partial evaluation?

In "Partial Evaluation of Computation Process—An Approach to a Compiler-Compiler" Yoshihiko Futamura wrote: "[Some] portions of a computation process [...] are not evaluated at partial evaluation ...
0
votes
0answers
403 views

Evaluating Functions Using a Parse Tree

I'm making a compiler/interpreter for a language similar to C. I already have a parse tree. I was able to evaluate expression statements by converting my code to another language and then using an ...
0
votes
1answer
892 views

Evaluating Statements Using a Parse Tree

I'm building a compiler. I already have a parse tree which I built using Bison for a grammar similar to the ANSI C grammar in this link. I see that for multiplicative expression in my parse tree, ...
3
votes
2answers
1k views

is there any hardware device to convert source code into machine language? [closed]

Is there any hardware device inside computer that helps to convert high level language into machine, like compiler and assembler ?
72
votes
9answers
10k 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 ...
14
votes
2answers
124 views

What are potential pitfalls with having a minimal kernel that runs managed code?

Suppose I want to build an operating system based on a very small native lower kernel that acts as a managed code interpreter/runtime and a larger upper kernel compiled to a non-native machine ...
4
votes
2answers
120 views

Is it possible to go from code to circuit?

I am wondering if it is possible to have a program that interprets programming code and is capable of turning that code into an optimized circuit. Is this possible, and if so, does it exist?
1
vote
1answer
263 views

Emulation, interpreters and parallel execution

I'm interested in how software emulators of old game consoles work. These must consist of an interpreter for the machine language of the emulated processor. If I have understood correctly an ...
1
vote
1answer
1k 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 ...
7
votes
1answer
1k 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 ...
2
votes
1answer
203 views

Is this a good approach for first attempt to create my own language and compiler?

I want to try to create my own very simple programming language and it's compiler or interpreter. The programming language I use is Java. My idea was to create a compiler which will compile source ...
1
vote
0answers
122 views

What is a trampolined interpreter? [closed]

Can anyone explain me what is a trampolined interpreter? I am versed with relevant concepts viz. procedural languages, continuations etc but am finding difficulty understanding the definition/need for ...
0
votes
1answer
116 views

Type checking on assignment

I want to develop an interpreter. In the language, you have values and variables and types. The literals (the values) belong to some basic type. The subtypes can constrain the range of values. The ...
1
vote
2answers
316 views

Does interpreter for language L1 have to be written in lower level language L0?

While reading A.S. Tanenbaum's book "Structured Computer Organization", I had come to this paragraph. The text is about how interpretation of a program works. The other technique is to write a ...
3
votes
2answers
4k views

How does interpreting a script work?

Suppose I have a script (.vbs, for example) that is stored in a file. How does the code in the file get converted into machine instructions? What is between the ...