De?nition of garbage

Assignment Help Basic Computer Science
Reference no: EM13963449

De?nition of Garbage

This question asks you to think about garbage collection in Lisp and compare our de?nition of garbage in the text to the one given in McCarthy's 1960 paper on Lisp. McCarthy's de?nition is written for Lisp speci?cally, whereas our de?nition is stated generally for any programming language. Answer the question by comparing the de?nitions as they apply to Lisp only. Here are the two de?nitions.

Garbage, our de?nition: At a given point in the execution of a program P, a memory location m is garbage if no continued execution of P from this point can access location m.

Garbage, McCarthy's de?nition: "Each register that is accessible to the program is accessible because it can be reached from one or more of the base registers by a chain of car and cdr operations. When the contents of a base register are changed, it may happen that the register to which the base register formerly pointed cannot be reached by a car-cdr chain from any base register. Such a register may be considered abandoned by the program because its contents can no longer be found by any possible program."

(a) If a memory location is garbage according to our de?nition, is it necessarily garbage according to McCarthy's de?nition? Explain why or why not.

(b) If a location is garbage according to McCarthy's de?nition, is it garbage by our de?nition? Explain why or why not.

(c) There are garbage collectors that collect everything that is garbage according to McCarthy's de?nition. Would it be possible to write a garbage collector to collect everything that is garbage according to our de?nition? Explain why or why not.

Reference no: EM13963449

Questions Cloud

Complete the home painting : Imagine that your neighbor contracts with a local house painter to have his house painted on Saturday. The contract calls for the painter to begin painting the home on Saturday at 8:00 a.m. and complete the home painting
Single-step income statement into a multiple-step : single-step income statement into a multiple-step income statement for the month ended October 31, 2015. Income Statement For the year ended October
Describe the event the client experienced : Create a mock case study of a client who is a survivor of a traumatic event and who has overcome the experience, and is now demonstrating resilience and overall wellbeing. Include and discuss the following concepts: Introduce the concept of resilie..
Problem regarding the reference counting : This question is about a possible implementation of garbage collection for Lisp. Both impure and pure Lisp have lambda abstraction, function application, and elementary functions atom, eq, car, cdr, and cons. Impure Lisp also has rplaca, rplacd, a..
De?nition of garbage : This question asks you to think about garbage collection in Lisp and compare our de?nition of garbage in the text to the one given in McCarthy's 1960 paper on Lisp. McCarthy's de?nition is written for Lisp speci?cally, whereas our de?nition is sta..
Description and symptoms of parkinson disease : Provide a short description and the symptoms of Parkinson's disease or early detections, if any
What is the speed of sound in air at each temperature : The coldest and hottest temperatures recorded are: 134 degrees Farhenheit and -80 degrees Farhenheit.
Journalize the entry to record the current depreciation : Journalize the entry to record the current depreciation of the old equipment to the date of trade-in.
What is the minimum photon energy in electron volts : The metallic light-receiving surface within each tube is sensitive to light of wavelengths shorter than 605 x 10^2nm. The corresponding photon energy represents the minimum energy to eject a photoelectron. What is the minimum photon energy in elec..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Involved in implementing a database for the restaurant

Draw a conceptual ER diagram in Information Engineering format as discussed in the course that  describes the following aspects involved in implementing a database for the restaurant.

  Design suitable mechanism to solve graph coloring problem

Consider a graph coloring problem where we have a very large graph G = (V, E), whose vertices are to be colored using 3 distinct colors such that no adjacent node in G has the same color. Design a suitable mechanism to solve the given problem.

  Structural domain modeling construct

Describe that are selected for description as shown above. Use the Main Flow/Extensions format. For ease of reference, use the selected use case numbers (from 1 to 11)

  Write a program that reads a list of numbers

write a program that reads a list of numbers, counts them, and calculates their arithmetic mean, geometric mean, and harmonic mean. These values should be printed with appropriate labels.

  Technology drivers for today information systems

Discuss the Business and technology drivers for today's information systems.

  What can we predict about the future of our economy

1. Would culture affect one's propensity to save? Or, would geographic location affect one's propensity to save?

  Describe the structure of the world wide web

Describe the structure of the World Wide Web as interconnected hypertext documents and create and validate HTML documents - create presentations using Cascading Style Sheets and DHTML.

  Write a python programs to solve

Write a Python programs to solve the following. Scientist measure an object's mass in kilograms and its weight in newtons. The equation is weight = mass * 9.8.

  Executing edi for competitive advantage

If firm chooses to execute EDI for competitive advantage, how can it assure advantage will last?

  Write a program that displays all three digit

Write a program that displays all three digit numbers: abc, that if subtracted by cba will deliver a number that contains the same digits: a, b, c, but in a different order.

  The digital system usually operated

1) The digital system usually operated on .........system. (a) binary (b) decimal (c)octal (d) hexadecimal 2)The First Microprocessor was__________

  Two cyborgs walk into your home

Two cyborgs walk into your home, both claiming to be oracles for the graph 3-colorability decision problem. They both always give a yes/no answer in constant time for any instance, and are each self-consistent

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd