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

  Describe in 200 to 300 words at least two different ways to

explain in 200 to 300 words at least two different ways to secure a wlan. what are the ramifications if a wlan is

  The company uses several factors to set discounts

The company uses several factors to set discounts, as follows: A student who has taken a safe driver course earns a 5% discount A student with a clean record (no tickets or accidents in the last three years) earns a 5% discount

  Create memo for management-accounting information systems

Create a memo to your management in which you address significance of accounting information systems. Give some main features of accounting information system.

  Simpl program prove by structural induction

Let c be an arbitrary SIMPL program and assume that judgment ßs' holds for some store s'. Prove by structural induction that x Î pre(s'), where pre(s') denotes the preimage of s'.

  Identify the advantages and disadvantages of using word

Identify the advantages and disadvantages of using Word to work with graphics, tables, and special formatting functionality. Provide specific examples. Create a list of "Word Best Practices" to keep in mind when using Word or other word documen..

  Program that determines for each of the five hands

Write a program that determines, for each of the five hands of the game, whether or not then Ace is played.

  Analyze hardware virtualization

Determine if you would prefer a virtualized environment to a non-virtualized environment for a midsized business or organization and explain why or why not. Compare the cloud computing cost models used by Amazon EC2 and Microsoft Azure.

  How many different committee choices are possible

A committee of 5 people must be chosen from a group of 7 men and 9 women. If the committee is required to have at least 1 woman, how many different committee choices are possible?

  Use a cluster to provide fault-tolerant computing

Describe the trade-offs between your solution and a single multiprocessor-based computer system solution.

  Matlab includes functions upper and lower

Matlab includes functions upper and lower which shift a string from upper case to lower case respectively. create a  new function called caps.m which capitalizes the first letter in each word and forces all other letters to be lowercase. the function..

  Define function that takes an argument in name of a csv file

Define a function that takes an argument in the name of a CSV file. This file has a single row containing letter grades (A-F) separated by comma (hence CSV file). Your function should print the distribution of grades.

  Research paper proposal

As you are exploring different ideas for your paper, note the research paper will require you to submit 8-10 double-spaced, typed pages regarding a topic identified in the textbook or another topic relative to this course.

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