Questions tagged [abstract-machine]

A model of a computer system (hardware or software) constructed to allow a detailed and precise analysis of how the computer system works. It usually consists of input, output, and the operation set.

12 questions
9
votes
2 answers

How is code stored and executed on the C++ abstract machine?

In the first book I read about C++, it went a little bit into the details of how code is actually executed on a machine (it mentioned the program counter, the call stack, return addresses, and such). I found it really fascinating to get to know how…
8
votes
1 answer

Comparision of abstract machines for execution of Prolog

I'm looking for research paper or any other publication that compare different abstract machines (more than one) for execution of Prolog with prolog interpreters not based on abstact machines. What I've seen so far is that majority of…
7
votes
3 answers

In the SECD Machine how does "rap" work?

I am writing a simulator of the SECD machine in C# guided by the description on Wikipedia. I have the basic operations completed, but I am not sure how to implement the rap instruction. At Wikipedia it says about rap: rap works like ap, only that…
cdiggins
  • 17,602
  • 7
  • 105
  • 102
7
votes
4 answers

Result of sizeof for C++ arrays and pointers

On an x86_64 architecture, a pointer is 8 bytes. It makes sense to me that sizeof(x) should return 8. I understand that a char is a single byte, and 5 bytes is the size of array z. What is the intuition behind why sizeof(z) does not return 8? int* x…
4
votes
0 answers

What is C++ abstract machine

Well, I know Java has JVM and I've used C++ for 5 years and I don't think there is any C++ abstract machine. However, today I read this link: https://en.cppreference.com/w/cpp/language/memory_model and it said: Defines the semantics of computer…
Yves
  • 11,597
  • 17
  • 83
  • 180
2
votes
3 answers

Parse an Expression to its components and sub components

I need to parse an expression such as: neg(and(X,Y)) I need it to come out with the Abstract Stack Machine Code Such as for the example above: LOAD X; LOAD Y; EXEC and; EXEC neg; But for now the machine code is not an issue, how can i parse / break…
Zapnologica
  • 22,170
  • 44
  • 158
  • 253
1
vote
2 answers

What is a Abstract Machine?

I don't quite get the definition and use case of an abstract machine and how its actually related to a compiler or interpreter I googled what abstract machines were but understood very little out of it. An abstract machine is a model of a computer…
0
votes
1 answer

C11/C++11 memory model acquire, release, relaxed specifics

I have some doubts about the C++11/C11 memory model that I was wondering if anyone can clarify. These are questions about the model/abstract machine, not about any real architecture. Are acquire/release effects guaranteed to "cascade" from one…
0
votes
0 answers

How can Turing machine compare to a computer?

I have read articles including wikipedia about Turing machine. And here is also question about Turing machine. After reading those, what I understand about T.M is it's just a logical machine with infinite tape, R/W head and a table with rules. If…
Nyein Chan
  • 1,215
  • 2
  • 17
  • 32
0
votes
2 answers

generate abstract machine code from simple programming instructions

My question is what I will need learn to complete that task ...the task is to create automatic code generator from simple programming instructions like (x:=5-z; while x
strakz
  • 101
  • 2
  • 10
0
votes
1 answer

Abstract machine for Java bytecode

I was wondering if anyone is familiar with an abstract machine that is capable of executing Java bytecode. Note I'm looking for something I can extend, and by abstract machine, I don't mean the JVM, as I need to specify the semantics. Specifically,…
Darioush
  • 565
  • 3
  • 14
0
votes
1 answer

Is there a free Warren Abstract Machine implementation for Delphi?

I have done a thorough search but were still in vain. Reference: Warren abstract machine (Wikipedia). Question: Is there any such implementation (open source)? If not, I am enclined to accept an answer for a solution wrapping a good one written in…
menjaraz
  • 7,551
  • 4
  • 41
  • 81