SlideShare a Scribd company logo
	Scope and Extent in Lisp
Determiners of scopeThe circumstance which determines scope in CommonLisp includes:The location of reference within an expression.
The kind of expression in which the reference takes place.
The location of the reference within the program text.
The specific instance of the program within which the reference is resolved.Common lisp programmers must know :What kind of reference is being usedWhat kind of scope it uses if it is a variable referenceIn what environment is the reference solvedWhere was the binding introduced etc..
 In common lisp, the notations Scope and extent are used when some object or constraint has to be referred to or from a distant part of the program.
 Scope refers to textual or spatial region of the program within which references may occur.Extent refers to the interval of time through which references may occur.Ex: (defun copy-cell (x) (cons (car x) (cdr x)))Here, the scope of the parameter x is the body of the defun form.The extent of the form is the interval form the time the function is invoked to the time it is exited.
Different kinds of scope and extent used in Common LispLexical scope: references to the established entity can occur only within certain program portions that are lexically contained within the establishing construct.Ex: names of the parenthesis to a function are lexically scoped.Indefinite scope:  references may occur anywhere in the program.
Dynamic extent: references may occur at any time between the establishment of the entity and the explicit disestablishment of the entity.
Indefinite extent: this entity continues to exist as long as the possibility of the reference remains.Most common Lisp data objects have indefinite extent.

More Related Content

What's hot (20)

PPT
4. java intro class
Quan Ho
 
PPTX
Data Structure and Algorithms –Introduction.pptx
R S Anu Prabha
 
DOCX
Declaration programming 2017
Marke Greene
 
PPTX
Functions
avinashdevnani
 
PDF
Doppl development iteration #1
Diego Perini
 
PDF
Asp.net main
YogeshDhamke2
 
PDF
Topic Segmentation in Dialogue
Jinho Choi
 
PPTX
Polymorphism
Prof .Pragati Khade
 
PPT
Interfaces
Jai Marathe
 
PDF
Hua Shan - 2015 - A Dependency-to-String Model for Chinese-Japanese SMT System
Association for Computational Linguistics
 
PPTX
Semantic scaffolds for pseudocode to-code generation (2020)
Minhazul Arefin
 
PPT
Interpreter
Ahmad Al-bsheer
 
PDF
C++ programing lanuage
Nimai Chand Das
 
PPTX
Introduction to Operational Semantics
jsinglet
 
PDF
Data handling CBSE PYTHON CLASS 11
chinthala Vijaya Kumar
 
PDF
Password protected diary
SHARDA SHARAN
 
PPT
Literals,variables,datatype in C#
Prasanna Kumar SM
 
PDF
A Survey of Various Methods for Text Summarization
IJERD Editor
 
4. java intro class
Quan Ho
 
Data Structure and Algorithms –Introduction.pptx
R S Anu Prabha
 
Declaration programming 2017
Marke Greene
 
Functions
avinashdevnani
 
Doppl development iteration #1
Diego Perini
 
Asp.net main
YogeshDhamke2
 
Topic Segmentation in Dialogue
Jinho Choi
 
Polymorphism
Prof .Pragati Khade
 
Interfaces
Jai Marathe
 
Hua Shan - 2015 - A Dependency-to-String Model for Chinese-Japanese SMT System
Association for Computational Linguistics
 
Semantic scaffolds for pseudocode to-code generation (2020)
Minhazul Arefin
 
Interpreter
Ahmad Al-bsheer
 
C++ programing lanuage
Nimai Chand Das
 
Introduction to Operational Semantics
jsinglet
 
Data handling CBSE PYTHON CLASS 11
chinthala Vijaya Kumar
 
Password protected diary
SHARDA SHARAN
 
Literals,variables,datatype in C#
Prasanna Kumar SM
 
A Survey of Various Methods for Text Summarization
IJERD Editor
 

Viewers also liked (20)

PPTX
LISP: Type specifiers in lisp
DataminingTools Inc
 
PPT
System Init
cntlinux
 
PPTX
Data Applied: Similarity
DataminingTools Inc
 
PPTX
Mysql:Operators
DataminingTools Inc
 
PPTX
SPSS: Data Editor
DataminingTools Inc
 
PPTX
Probability And Its Axioms
DataminingTools Inc
 
PPTX
Data Mining The Sky
DataminingTools Inc
 
PPTX
Oracle: Joins
DataminingTools Inc
 
PPTX
XL-Miner: Timeseries
DataminingTools Inc
 
PPT
Wisconsin Fertility Institute: Injection Class 2011
WisFertility
 
PPTX
Quick Look At Classification
DataminingTools Inc
 
PPTX
Control Statements in Matlab
DataminingTools Inc
 
PDF
Jive Clearspace Best#2598 C8
mrshamilton1b
 
PPTX
Drc 2010 D.J.Pawlik
slrommel
 
PPTX
Introduction To Programming in Matlab
DataminingTools Inc
 
PPTX
MySql:Introduction
DataminingTools Inc
 
PPTX
LISP:Loops In Lisp
DataminingTools Inc
 
PPT
HistoriografíA Latina LatíN Ii
lara
 
LISP: Type specifiers in lisp
DataminingTools Inc
 
System Init
cntlinux
 
Data Applied: Similarity
DataminingTools Inc
 
Mysql:Operators
DataminingTools Inc
 
SPSS: Data Editor
DataminingTools Inc
 
Probability And Its Axioms
DataminingTools Inc
 
Data Mining The Sky
DataminingTools Inc
 
Oracle: Joins
DataminingTools Inc
 
XL-Miner: Timeseries
DataminingTools Inc
 
Wisconsin Fertility Institute: Injection Class 2011
WisFertility
 
Quick Look At Classification
DataminingTools Inc
 
Control Statements in Matlab
DataminingTools Inc
 
Jive Clearspace Best#2598 C8
mrshamilton1b
 
Drc 2010 D.J.Pawlik
slrommel
 
Introduction To Programming in Matlab
DataminingTools Inc
 
MySql:Introduction
DataminingTools Inc
 
LISP:Loops In Lisp
DataminingTools Inc
 
HistoriografíA Latina LatíN Ii
lara
 
Ad

Similar to LISP: Scope and extent in lisp (20)

PPTX
LISP:Declarations In Lisp
LISP Content
 
PPTX
LISP: Declarations In Lisp
DataminingTools Inc
 
PPTX
LISP:Control Structures In Lisp
DataminingTools Inc
 
PPTX
LISP: Control Structures In Lisp
LISP Content
 
PPTX
Chapter-3 الشابتر الثالث هياكل بيانات جامعة خالد .pptx
HakimAlHuribi
 
DOCX
Chapter 5: Names, Bindings and Scopes (review Questions and Problem Set)
Farwa Ansari
 
PDF
Advanced features of Lisp functions Advanced features of Lisp functions
CvDs3
 
PDF
Subprogram
baran19901990
 
PPT
Theory of programming language chapter 5
memonrizwan053
 
PPT
INTRODUCTION TO LISP
Nilt1234
 
PPTX
Dynamic scoping
Ishaan Aggarwal
 
PPTX
A brief introduction to lisp language
David Gu
 
PPTX
Bound
Edward Kmett
 
PDF
Name binding with scope graphs
Eelco Visser
 
PPTX
LISP: Macros in lisp
DataminingTools Inc
 
PPTX
LISP: Macros in lisp
LISP Content
 
PPTX
LISP: Introduction to lisp
DataminingTools Inc
 
PPTX
LISP: Introduction To Lisp
LISP Content
 
PPTX
AI Programming language (LISP)
Dr. SURBHI SAROHA
 
PPT
ComputerLangugesProgramingCSECourseCh05-part2.ppt
ReemAlwani1
 
LISP:Declarations In Lisp
LISP Content
 
LISP: Declarations In Lisp
DataminingTools Inc
 
LISP:Control Structures In Lisp
DataminingTools Inc
 
LISP: Control Structures In Lisp
LISP Content
 
Chapter-3 الشابتر الثالث هياكل بيانات جامعة خالد .pptx
HakimAlHuribi
 
Chapter 5: Names, Bindings and Scopes (review Questions and Problem Set)
Farwa Ansari
 
Advanced features of Lisp functions Advanced features of Lisp functions
CvDs3
 
Subprogram
baran19901990
 
Theory of programming language chapter 5
memonrizwan053
 
INTRODUCTION TO LISP
Nilt1234
 
Dynamic scoping
Ishaan Aggarwal
 
A brief introduction to lisp language
David Gu
 
Name binding with scope graphs
Eelco Visser
 
LISP: Macros in lisp
DataminingTools Inc
 
LISP: Macros in lisp
LISP Content
 
LISP: Introduction to lisp
DataminingTools Inc
 
LISP: Introduction To Lisp
LISP Content
 
AI Programming language (LISP)
Dr. SURBHI SAROHA
 
ComputerLangugesProgramingCSECourseCh05-part2.ppt
ReemAlwani1
 
Ad

More from DataminingTools Inc (20)

PPTX
Terminology Machine Learning
DataminingTools Inc
 
PPTX
Techniques Machine Learning
DataminingTools Inc
 
PPTX
Machine learning Introduction
DataminingTools Inc
 
PPTX
Areas of machine leanring
DataminingTools Inc
 
PPTX
AI: Planning and AI
DataminingTools Inc
 
PPTX
AI: Logic in AI 2
DataminingTools Inc
 
PPTX
AI: Logic in AI
DataminingTools Inc
 
PPTX
AI: Learning in AI 2
DataminingTools Inc
 
PPTX
AI: Learning in AI
DataminingTools Inc
 
PPTX
AI: Introduction to artificial intelligence
DataminingTools Inc
 
PPTX
AI: Belief Networks
DataminingTools Inc
 
PPTX
AI: AI & Searching
DataminingTools Inc
 
PPTX
AI: AI & Problem Solving
DataminingTools Inc
 
PPTX
Data Mining: Text and web mining
DataminingTools Inc
 
PPTX
Data Mining: Outlier analysis
DataminingTools Inc
 
PPTX
Data Mining: Mining stream time series and sequence data
DataminingTools Inc
 
PPTX
Data Mining: Mining ,associations, and correlations
DataminingTools Inc
 
PPTX
Data Mining: Graph mining and social network analysis
DataminingTools Inc
 
PPTX
Data warehouse and olap technology
DataminingTools Inc
 
PPTX
Data Mining: Data processing
DataminingTools Inc
 
Terminology Machine Learning
DataminingTools Inc
 
Techniques Machine Learning
DataminingTools Inc
 
Machine learning Introduction
DataminingTools Inc
 
Areas of machine leanring
DataminingTools Inc
 
AI: Planning and AI
DataminingTools Inc
 
AI: Logic in AI 2
DataminingTools Inc
 
AI: Logic in AI
DataminingTools Inc
 
AI: Learning in AI 2
DataminingTools Inc
 
AI: Learning in AI
DataminingTools Inc
 
AI: Introduction to artificial intelligence
DataminingTools Inc
 
AI: Belief Networks
DataminingTools Inc
 
AI: AI & Searching
DataminingTools Inc
 
AI: AI & Problem Solving
DataminingTools Inc
 
Data Mining: Text and web mining
DataminingTools Inc
 
Data Mining: Outlier analysis
DataminingTools Inc
 
Data Mining: Mining stream time series and sequence data
DataminingTools Inc
 
Data Mining: Mining ,associations, and correlations
DataminingTools Inc
 
Data Mining: Graph mining and social network analysis
DataminingTools Inc
 
Data warehouse and olap technology
DataminingTools Inc
 
Data Mining: Data processing
DataminingTools Inc
 

Recently uploaded (20)

PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 

LISP: Scope and extent in lisp

  • 2. Determiners of scopeThe circumstance which determines scope in CommonLisp includes:The location of reference within an expression.
  • 3. The kind of expression in which the reference takes place.
  • 4. The location of the reference within the program text.
  • 5. The specific instance of the program within which the reference is resolved.Common lisp programmers must know :What kind of reference is being usedWhat kind of scope it uses if it is a variable referenceIn what environment is the reference solvedWhere was the binding introduced etc..
  • 6. In common lisp, the notations Scope and extent are used when some object or constraint has to be referred to or from a distant part of the program.
  • 7. Scope refers to textual or spatial region of the program within which references may occur.Extent refers to the interval of time through which references may occur.Ex: (defun copy-cell (x) (cons (car x) (cdr x)))Here, the scope of the parameter x is the body of the defun form.The extent of the form is the interval form the time the function is invoked to the time it is exited.
  • 8. Different kinds of scope and extent used in Common LispLexical scope: references to the established entity can occur only within certain program portions that are lexically contained within the establishing construct.Ex: names of the parenthesis to a function are lexically scoped.Indefinite scope: references may occur anywhere in the program.
  • 9. Dynamic extent: references may occur at any time between the establishment of the entity and the explicit disestablishment of the entity.
  • 10. Indefinite extent: this entity continues to exist as long as the possibility of the reference remains.Most common Lisp data objects have indefinite extent.
  • 11. In case of lexical scope, if two constructs that establish entities with the same name are textually nested, then references within the inner construct refer to the entity established by the inner one, the inner one shadows the outer one.Ex: (defun test(x z) (let ((z (* x 2))) (print z)) z)Here, binding of the variable z by the let construct shadows the parameter binding for the function test. The reference to the variable z at the print form refers to the let binding. The reference to z at the end of the function refers to the parameter named z.
  • 12. Ex: ( defun compose( f g)# ‘ (lambda (x) (funcall f (funcall g x))))The parameter bindings for f and g do not disappear because the returned function, when called, could still refer to those bindings.( funcall (compose #’ sqrt # ‘ abs) -9.0)Produces the value 3.0
  • 13. LET variablesObjects bound by function parameters and LET forms have lexical scope.
  • 14. Their bindings are visible beginning at a certain textual location in the defining form and continuing through the textual end of the defining form.
  • 15. Any reference to a textually identical name from outside of the defining name must refer to a different binding.
  • 16. A nested defining form may declare a binding that shadows an enclosing binding to a textually identical name. Special variablesSpecial variables (dynamic variables) have dynamic scope.
  • 17. A binding is created for a special variable as the result of the executing some form in your program.
  • 18. The scope of the dynamic form extends into any form ( called directly or indirectly) by the form which established the dynamic binding.
  • 19. The extent of the dynamic form exists indefinitely, until the dynamic form finishes executing.Visit more self help tutorialsPick a tutorial of your choice and browse through it at your own pace.The tutorials section is free, self-guiding and will not involve any additional support.Visit us at www.dataminingtools.net