SlideShare a Scribd company logo
Object System Lisp
overviewProgrammer interface conceptsClassesSlotsInheritanceGeneric functions and methodsIntroduction to generic functionsIntroduction to methodsStandard method classes and method objectsObject creation and initializationExtensions
Programmer interface conceptsThe common lisp open system(CLOS) is an object-oriented extension to Common Lisp.In the standard programmer interface of CLOS, we have,The first part, Programmer interface concepts
The second part, Functions in  programmers interface, contains a description of the functions and macros in CLOS programmers interface.
The third part, common lisp object system meta-object protocol, explains how the CLOS has to be customized.classesA class is an object that determines the structure and the behavior of a set of other objects, which are called its instances.A class can inherit structure and behavior from other classes.A class whose definition refers to other classes for the purpose of inheriting The classes that are designated for the purpose of inheritance are said to be the super classes of the inheriting class.
The function class-name takes a class object and returns its nameEach class has a class precedence list, which is the total ordering on the set of the given class and its super classes.The total ordering is a list ordered from the most specific to least specific.
Defining classesThe macro defmacro is used to define a new named class.The definition includesName of the new class.
List of the directed super classes of the new class
A set of slot specifiers
A set of class optionsThe generic function make-instance creates and returns a new instance of a class.
slotsAn object that has standard-class as its metaclass has zero or more slots.The slots of an object are determined by the class of the object.Each slot can hold one value.The default initial value of a slot is defined by the :initform slot option.
A local slot is the one that is visible to exactly one instance, namely the one in which the slot is allocated.A shared slot is defined to be a slot that is visible to more than one instance of a given class and its subclassesA slot can be accessed in two ways: by the use of primitive function slot-value.
By use of generic functions generated by the defclass form.InheritanceA class can inherit methods, slots and some defclass options from its super classes.A subclass inherits methods in the sense that any method applicable to all instances of a class is also applicable to all instances of any subclass of that class.Inheritance of class options:The :default-initargs class option is inheritedEx: ( defclass c1 ()        ((s1 :initform 5.4 :type number)          (s2 :allocation :class))) Instances of class c1 have a local slot named s1, whose default initial value is 5.4
s1 should always be a number.
Class c1 also has a shared slot named s2.(defclass c2 (c1)       ((s1 :initform 5 :type integer)        (s2 :allocation :instance)        (s3 :accessor c2-s3)))There is a local slot named s1 in instances of c2.
The default initial value of s1 is 5.
The value of s1 will be of type integer.
There are also local slots of named s2 and s3 in instances of c2.
The class c2 has a method for c2-s3 for reading the value of slot s3.Determining the class precedence ListThe defclass form for a class provides a total ordering on that class and its direct super classes.This ordering is called the local precedence order.The class precedence list for a class C is a total ordering on C and its super classes that is consistant with the local precedence orders for C and its super classes.
Class precedence list ArrayBit-vectorCharacterComplexConsFloatFunction*Hash-table*IntegerListNull
NumberPackage*Pathname*Random-state*RatioRationalReadtable*SequenceStream*StringSymboltvector
Introduction to generic functionsA generic function object contains a set of methods, lambda-list, a method combination type, and other information.A generic function can be given a global name using the defmethod and defgeneric construct.A generic function can be given a local name using generic-flet, generic-labels, or with-added-method special forms.
Introduction to methodsA method object contains a method function, a sequence of parameter specializes which specify when the given method is applicable, a lambda-list and a sequence of qualifiers.A method-defining form contains the code that is to be run when the arguments for the generic function cause the method that it defines to be invoked.
Congruent lambda-list for all methods of a generic function Each lambda-list must have the same number of required parametersEach lambda-list must have the same number of optional.If any lambda-list mentions &rest or &key, each lambda-list must mention one or both of them.If the generic function lambda-list mentions &key, each method must accept all of the keyword names mentioned after &key, either  by accepting them explicitly, by specifying &allow-other-keys, or by specifying &rest but and &key.
Standard method combinationStandard method combination is supported by the class standard-generic-function.Primary functions define the main action of the effective method, while auxiliary methods modify that action in one of three ways:A primary method has no method qualifier.An auxiliary method is a method whose method qualifier is :before, :after, or :aroundThe macro define-method-combination defines new forms of method combinations.It provides an effective method for customizing the production of the effective method.

More Related Content

What's hot (20)

Refactoring bad codesmell
Refactoring bad codesmellRefactoring bad codesmell
Refactoring bad codesmell
hyunglak kim
 
Lecture 4_Java Method-constructor_imp_keywords
Lecture   4_Java Method-constructor_imp_keywordsLecture   4_Java Method-constructor_imp_keywords
Lecture 4_Java Method-constructor_imp_keywords
manish kumar
 
JAVA Notes - All major concepts covered with examples
JAVA Notes - All major concepts covered with examplesJAVA Notes - All major concepts covered with examples
JAVA Notes - All major concepts covered with examples
Sunil Kumar Gunasekaran
 
Unit3 part2-inheritance
Unit3 part2-inheritanceUnit3 part2-inheritance
Unit3 part2-inheritance
DevaKumari Vijay
 
Java session4
Java session4Java session4
Java session4
Jigarthacker
 
Chapter 13 - Inheritance and Polymorphism
Chapter 13 - Inheritance and PolymorphismChapter 13 - Inheritance and Polymorphism
Chapter 13 - Inheritance and Polymorphism
Eduardo Bergavera
 
Lecture 8 abstract class and interface
Lecture   8 abstract class and interfaceLecture   8 abstract class and interface
Lecture 8 abstract class and interface
manish kumar
 
My c++
My c++My c++
My c++
snathick
 
L7 inheritance
L7 inheritanceL7 inheritance
L7 inheritance
teach4uin
 
Inheritance and Polymorphism Java
Inheritance and Polymorphism JavaInheritance and Polymorphism Java
Inheritance and Polymorphism Java
M. Raihan
 
Ppt on this and super keyword
Ppt on this and super keywordPpt on this and super keyword
Ppt on this and super keyword
tanu_jaswal
 
Unit3 inheritance
Unit3 inheritanceUnit3 inheritance
Unit3 inheritance
Kalai Selvi
 
Lecture - 3 Variables-data type_operators_oops concept
Lecture - 3 Variables-data type_operators_oops conceptLecture - 3 Variables-data type_operators_oops concept
Lecture - 3 Variables-data type_operators_oops concept
manish kumar
 
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B KuteChapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Tushar B Kute
 
packages and interfaces
packages and interfacespackages and interfaces
packages and interfaces
madhavi patil
 
Generics in java
Generics in javaGenerics in java
Generics in java
suraj pandey
 
البرمجة الهدفية بلغة جافا - الوراثة
البرمجة الهدفية بلغة جافا - الوراثةالبرمجة الهدفية بلغة جافا - الوراثة
البرمجة الهدفية بلغة جافا - الوراثة
Mahmoud Alfarra
 
Seminar on java
Seminar on javaSeminar on java
Seminar on java
shathika
 
Java Generics
Java GenericsJava Generics
Java Generics
DeeptiJava
 
Class and object
Class and objectClass and object
Class and object
prabhat kumar
 
Refactoring bad codesmell
Refactoring bad codesmellRefactoring bad codesmell
Refactoring bad codesmell
hyunglak kim
 
Lecture 4_Java Method-constructor_imp_keywords
Lecture   4_Java Method-constructor_imp_keywordsLecture   4_Java Method-constructor_imp_keywords
Lecture 4_Java Method-constructor_imp_keywords
manish kumar
 
JAVA Notes - All major concepts covered with examples
JAVA Notes - All major concepts covered with examplesJAVA Notes - All major concepts covered with examples
JAVA Notes - All major concepts covered with examples
Sunil Kumar Gunasekaran
 
Chapter 13 - Inheritance and Polymorphism
Chapter 13 - Inheritance and PolymorphismChapter 13 - Inheritance and Polymorphism
Chapter 13 - Inheritance and Polymorphism
Eduardo Bergavera
 
Lecture 8 abstract class and interface
Lecture   8 abstract class and interfaceLecture   8 abstract class and interface
Lecture 8 abstract class and interface
manish kumar
 
L7 inheritance
L7 inheritanceL7 inheritance
L7 inheritance
teach4uin
 
Inheritance and Polymorphism Java
Inheritance and Polymorphism JavaInheritance and Polymorphism Java
Inheritance and Polymorphism Java
M. Raihan
 
Ppt on this and super keyword
Ppt on this and super keywordPpt on this and super keyword
Ppt on this and super keyword
tanu_jaswal
 
Unit3 inheritance
Unit3 inheritanceUnit3 inheritance
Unit3 inheritance
Kalai Selvi
 
Lecture - 3 Variables-data type_operators_oops concept
Lecture - 3 Variables-data type_operators_oops conceptLecture - 3 Variables-data type_operators_oops concept
Lecture - 3 Variables-data type_operators_oops concept
manish kumar
 
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B KuteChapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Tushar B Kute
 
packages and interfaces
packages and interfacespackages and interfaces
packages and interfaces
madhavi patil
 
البرمجة الهدفية بلغة جافا - الوراثة
البرمجة الهدفية بلغة جافا - الوراثةالبرمجة الهدفية بلغة جافا - الوراثة
البرمجة الهدفية بلغة جافا - الوراثة
Mahmoud Alfarra
 
Seminar on java
Seminar on javaSeminar on java
Seminar on java
shathika
 

Viewers also liked (20)

AI: Logic in AI 2
AI: Logic in AI 2AI: Logic in AI 2
AI: Logic in AI 2
DataminingTools Inc
 
Bind How To
Bind How ToBind How To
Bind How To
cntlinux
 
RapidMiner: Advanced Processes And Operators
RapidMiner:  Advanced Processes And OperatorsRapidMiner:  Advanced Processes And Operators
RapidMiner: Advanced Processes And Operators
DataminingTools Inc
 
MS Sql Server: Doing Calculations With Functions
MS Sql Server: Doing Calculations With FunctionsMS Sql Server: Doing Calculations With Functions
MS Sql Server: Doing Calculations With Functions
DataminingTools Inc
 
Matlab Text Files
Matlab Text FilesMatlab Text Files
Matlab Text Files
DataminingTools Inc
 
C,C++ In Matlab
C,C++ In MatlabC,C++ In Matlab
C,C++ In Matlab
DataminingTools Inc
 
Paramount Search Partners
Paramount Search PartnersParamount Search Partners
Paramount Search Partners
jjmcdermott
 
Facebook: An Innovative Influenza Pandemic Early Warning System
Facebook: An Innovative Influenza Pandemic Early Warning SystemFacebook: An Innovative Influenza Pandemic Early Warning System
Facebook: An Innovative Influenza Pandemic Early Warning System
Chen Luo
 
LISP:Loops In Lisp
LISP:Loops In LispLISP:Loops In Lisp
LISP:Loops In Lisp
DataminingTools Inc
 
How To Make Pb J
How To Make Pb JHow To Make Pb J
How To Make Pb J
spencer shanks
 
RapidMiner: Setting Up A Process
RapidMiner: Setting Up A ProcessRapidMiner: Setting Up A Process
RapidMiner: Setting Up A Process
DataminingTools Inc
 
R Environment
R EnvironmentR Environment
R Environment
DataminingTools Inc
 
MySql:Basics
MySql:BasicsMySql:Basics
MySql:Basics
DataminingTools Inc
 
LíRica Latina 2ºBac Lara Lozano
LíRica Latina 2ºBac Lara LozanoLíRica Latina 2ºBac Lara Lozano
LíRica Latina 2ºBac Lara Lozano
lara
 
SPSS: Quick Look
SPSS: Quick LookSPSS: Quick Look
SPSS: Quick Look
DataminingTools Inc
 
Ccc
CccCcc
Ccc
msprincess915
 
Pentaho: Reporting Solution Development
Pentaho: Reporting Solution DevelopmentPentaho: Reporting Solution Development
Pentaho: Reporting Solution Development
DataminingTools Inc
 
Control Statements in Matlab
Control Statements in  MatlabControl Statements in  Matlab
Control Statements in Matlab
DataminingTools Inc
 
Direct-services portfolio
Direct-services portfolioDirect-services portfolio
Direct-services portfolio
vlastakolaja
 
Graph Plots in Matlab
Graph Plots in MatlabGraph Plots in Matlab
Graph Plots in Matlab
DataminingTools Inc
 
Ad

Similar to LISP:Object System Lisp (20)

Meta Object Protocols
Meta Object ProtocolsMeta Object Protocols
Meta Object Protocols
Pierre de Lacaze
 
Object oriented basics
Object oriented basicsObject oriented basics
Object oriented basics
vamshimahi
 
LISP: Data types in lisp
LISP: Data types in lispLISP: Data types in lisp
LISP: Data types in lisp
DataminingTools Inc
 
LISP: Data types in lisp
LISP: Data types in lispLISP: Data types in lisp
LISP: Data types in lisp
LISP Content
 
Objectorientedprogrammingmodel1
Objectorientedprogrammingmodel1Objectorientedprogrammingmodel1
Objectorientedprogrammingmodel1
bharath yelugula
 
Ruby Internals
Ruby InternalsRuby Internals
Ruby Internals
Burke Libbey
 
Classes & objects new
Classes & objects newClasses & objects new
Classes & objects new
lykado0dles
 
Euclideus_Language
Euclideus_LanguageEuclideus_Language
Euclideus_Language
Justin Gagnon
 
LISP: Type specifiers in lisp
LISP: Type specifiers in lispLISP: Type specifiers in lisp
LISP: Type specifiers in lisp
DataminingTools Inc
 
LISP: Type specifiers in lisp
LISP: Type specifiers in lispLISP: Type specifiers in lisp
LISP: Type specifiers in lisp
LISP Content
 
Delphi qa
Delphi qaDelphi qa
Delphi qa
sandy14234
 
Oop basic concepts
Oop basic conceptsOop basic concepts
Oop basic concepts
Swarup Kumar Boro
 
Object oriented Programming ____ABAP.docx
Object oriented Programming ____ABAP.docxObject oriented Programming ____ABAP.docx
Object oriented Programming ____ABAP.docx
dileepab99
 
Ruby
RubyRuby
Ruby
Kerry Buckley
 
Rubyforjavaprogrammers 1210167973516759-9
Rubyforjavaprogrammers 1210167973516759-9Rubyforjavaprogrammers 1210167973516759-9
Rubyforjavaprogrammers 1210167973516759-9
sagaroceanic11
 
Rubyforjavaprogrammers 1210167973516759-9
Rubyforjavaprogrammers 1210167973516759-9Rubyforjavaprogrammers 1210167973516759-9
Rubyforjavaprogrammers 1210167973516759-9
sagaroceanic11
 
Introduction To Lisp
Introduction To LispIntroduction To Lisp
Introduction To Lisp
kyleburton
 
Ruby object model
Ruby object modelRuby object model
Ruby object model
Chamnap Chhorn
 
Anton Kasyanov, Introduction to Python, Lecture5
Anton Kasyanov, Introduction to Python, Lecture5Anton Kasyanov, Introduction to Python, Lecture5
Anton Kasyanov, Introduction to Python, Lecture5
Anton Kasyanov
 
Ruby — An introduction
Ruby — An introductionRuby — An introduction
Ruby — An introduction
Gonçalo Silva
 
Object oriented basics
Object oriented basicsObject oriented basics
Object oriented basics
vamshimahi
 
LISP: Data types in lisp
LISP: Data types in lispLISP: Data types in lisp
LISP: Data types in lisp
LISP Content
 
Objectorientedprogrammingmodel1
Objectorientedprogrammingmodel1Objectorientedprogrammingmodel1
Objectorientedprogrammingmodel1
bharath yelugula
 
Classes & objects new
Classes & objects newClasses & objects new
Classes & objects new
lykado0dles
 
LISP: Type specifiers in lisp
LISP: Type specifiers in lispLISP: Type specifiers in lisp
LISP: Type specifiers in lisp
LISP Content
 
Object oriented Programming ____ABAP.docx
Object oriented Programming ____ABAP.docxObject oriented Programming ____ABAP.docx
Object oriented Programming ____ABAP.docx
dileepab99
 
Rubyforjavaprogrammers 1210167973516759-9
Rubyforjavaprogrammers 1210167973516759-9Rubyforjavaprogrammers 1210167973516759-9
Rubyforjavaprogrammers 1210167973516759-9
sagaroceanic11
 
Rubyforjavaprogrammers 1210167973516759-9
Rubyforjavaprogrammers 1210167973516759-9Rubyforjavaprogrammers 1210167973516759-9
Rubyforjavaprogrammers 1210167973516759-9
sagaroceanic11
 
Introduction To Lisp
Introduction To LispIntroduction To Lisp
Introduction To Lisp
kyleburton
 
Anton Kasyanov, Introduction to Python, Lecture5
Anton Kasyanov, Introduction to Python, Lecture5Anton Kasyanov, Introduction to Python, Lecture5
Anton Kasyanov, Introduction to Python, Lecture5
Anton Kasyanov
 
Ruby — An introduction
Ruby — An introductionRuby — An introduction
Ruby — An introduction
Gonçalo Silva
 
Ad

More from DataminingTools Inc (20)

Terminology Machine Learning
Terminology Machine LearningTerminology Machine Learning
Terminology Machine Learning
DataminingTools Inc
 
Techniques Machine Learning
Techniques Machine LearningTechniques Machine Learning
Techniques Machine Learning
DataminingTools Inc
 
Machine learning Introduction
Machine learning IntroductionMachine learning Introduction
Machine learning Introduction
DataminingTools Inc
 
Areas of machine leanring
Areas of machine leanringAreas of machine leanring
Areas of machine leanring
DataminingTools Inc
 
AI: Planning and AI
AI: Planning and AIAI: Planning and AI
AI: Planning and AI
DataminingTools Inc
 
AI: Logic in AI
AI: Logic in AIAI: Logic in AI
AI: Logic in AI
DataminingTools Inc
 
AI: Learning in AI 2
AI: Learning in AI 2AI: Learning in AI 2
AI: Learning in AI 2
DataminingTools Inc
 
AI: Learning in AI
AI: Learning in AI AI: Learning in AI
AI: Learning in AI
DataminingTools Inc
 
AI: Introduction to artificial intelligence
AI: Introduction to artificial intelligenceAI: Introduction to artificial intelligence
AI: Introduction to artificial intelligence
DataminingTools Inc
 
AI: Belief Networks
AI: Belief NetworksAI: Belief Networks
AI: Belief Networks
DataminingTools Inc
 
AI: AI & Searching
AI: AI & SearchingAI: AI & Searching
AI: AI & Searching
DataminingTools Inc
 
AI: AI & Problem Solving
AI: AI & Problem SolvingAI: AI & Problem Solving
AI: AI & Problem Solving
DataminingTools Inc
 
Data Mining: Text and web mining
Data Mining: Text and web miningData Mining: Text and web mining
Data Mining: Text and web mining
DataminingTools Inc
 
Data Mining: Outlier analysis
Data Mining: Outlier analysisData Mining: Outlier analysis
Data Mining: Outlier analysis
DataminingTools Inc
 
Data Mining: Mining stream time series and sequence data
Data Mining: Mining stream time series and sequence dataData Mining: Mining stream time series and sequence data
Data Mining: Mining stream time series and sequence data
DataminingTools Inc
 
Data Mining: Mining ,associations, and correlations
Data Mining: Mining ,associations, and correlationsData Mining: Mining ,associations, and correlations
Data Mining: Mining ,associations, and correlations
DataminingTools Inc
 
Data Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysisData Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysis
DataminingTools Inc
 
Data warehouse and olap technology
Data warehouse and olap technologyData warehouse and olap technology
Data warehouse and olap technology
DataminingTools Inc
 
Data Mining: Data processing
Data Mining: Data processingData Mining: Data processing
Data Mining: Data processing
DataminingTools Inc
 
Data Mining: clustering and analysis
Data Mining: clustering and analysisData Mining: clustering and analysis
Data Mining: clustering and analysis
DataminingTools Inc
 
AI: Introduction to artificial intelligence
AI: Introduction to artificial intelligenceAI: Introduction to artificial intelligence
AI: Introduction to artificial intelligence
DataminingTools Inc
 
Data Mining: Text and web mining
Data Mining: Text and web miningData Mining: Text and web mining
Data Mining: Text and web mining
DataminingTools Inc
 
Data Mining: Mining stream time series and sequence data
Data Mining: Mining stream time series and sequence dataData Mining: Mining stream time series and sequence data
Data Mining: Mining stream time series and sequence data
DataminingTools Inc
 
Data Mining: Mining ,associations, and correlations
Data Mining: Mining ,associations, and correlationsData Mining: Mining ,associations, and correlations
Data Mining: Mining ,associations, and correlations
DataminingTools Inc
 
Data Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysisData Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysis
DataminingTools Inc
 
Data warehouse and olap technology
Data warehouse and olap technologyData warehouse and olap technology
Data warehouse and olap technology
DataminingTools Inc
 
Data Mining: clustering and analysis
Data Mining: clustering and analysisData Mining: clustering and analysis
Data Mining: clustering and analysis
DataminingTools Inc
 

Recently uploaded (20)

No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven InfrastructureNo-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
Safe Software
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free DownloadViral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
Enabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FMEEnabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FME
Safe Software
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Artificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdfArtificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdf
OnBoard
 
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementaryMurdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
Edge AI and Vision Alliance
 
Bridging the divide: A conversation on tariffs today in the book industry - T...
Bridging the divide: A conversation on tariffs today in the book industry - T...Bridging the divide: A conversation on tariffs today in the book industry - T...
Bridging the divide: A conversation on tariffs today in the book industry - T...
BookNet Canada
 
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOMEstablish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Anchore
 
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdfvertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
AmirStern2
 
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
Safe Software
 
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdfcnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
AmirStern2
 
Down the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training RoadblocksDown the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training Roadblocks
Rustici Software
 
“Solving Tomorrow’s AI Problems Today with Cadence’s Newest Processor,” a Pre...
“Solving Tomorrow’s AI Problems Today with Cadence’s Newest Processor,” a Pre...“Solving Tomorrow’s AI Problems Today with Cadence’s Newest Processor,” a Pre...
“Solving Tomorrow’s AI Problems Today with Cadence’s Newest Processor,” a Pre...
Edge AI and Vision Alliance
 
Introduction to Typescript - GDG On Campus EUE
Introduction to Typescript - GDG On Campus EUEIntroduction to Typescript - GDG On Campus EUE
Introduction to Typescript - GDG On Campus EUE
Google Developer Group On Campus European Universities in Egypt
 
Your startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean accountYour startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean account
angelo60207
 
PyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent IntegrationPyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent Integration
barqawicloud
 
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
angelo60207
 
How to Detect Outliers in IBM SPSS Statistics.pptx
How to Detect Outliers in IBM SPSS Statistics.pptxHow to Detect Outliers in IBM SPSS Statistics.pptx
How to Detect Outliers in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI ProfessionalOracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven InfrastructureNo-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
Safe Software
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free DownloadViral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
Enabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FMEEnabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FME
Safe Software
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Artificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdfArtificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdf
OnBoard
 
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementaryMurdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
Edge AI and Vision Alliance
 
Bridging the divide: A conversation on tariffs today in the book industry - T...
Bridging the divide: A conversation on tariffs today in the book industry - T...Bridging the divide: A conversation on tariffs today in the book industry - T...
Bridging the divide: A conversation on tariffs today in the book industry - T...
BookNet Canada
 
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOMEstablish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Anchore
 
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdfvertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
AmirStern2
 
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
Safe Software
 
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdfcnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
AmirStern2
 
Down the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training RoadblocksDown the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training Roadblocks
Rustici Software
 
“Solving Tomorrow’s AI Problems Today with Cadence’s Newest Processor,” a Pre...
“Solving Tomorrow’s AI Problems Today with Cadence’s Newest Processor,” a Pre...“Solving Tomorrow’s AI Problems Today with Cadence’s Newest Processor,” a Pre...
“Solving Tomorrow’s AI Problems Today with Cadence’s Newest Processor,” a Pre...
Edge AI and Vision Alliance
 
Your startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean accountYour startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean account
angelo60207
 
PyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent IntegrationPyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent Integration
barqawicloud
 
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
angelo60207
 
How to Detect Outliers in IBM SPSS Statistics.pptx
How to Detect Outliers in IBM SPSS Statistics.pptxHow to Detect Outliers in IBM SPSS Statistics.pptx
How to Detect Outliers in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI ProfessionalOracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 

LISP:Object System Lisp

  • 2. overviewProgrammer interface conceptsClassesSlotsInheritanceGeneric functions and methodsIntroduction to generic functionsIntroduction to methodsStandard method classes and method objectsObject creation and initializationExtensions
  • 3. Programmer interface conceptsThe common lisp open system(CLOS) is an object-oriented extension to Common Lisp.In the standard programmer interface of CLOS, we have,The first part, Programmer interface concepts
  • 4. The second part, Functions in programmers interface, contains a description of the functions and macros in CLOS programmers interface.
  • 5. The third part, common lisp object system meta-object protocol, explains how the CLOS has to be customized.classesA class is an object that determines the structure and the behavior of a set of other objects, which are called its instances.A class can inherit structure and behavior from other classes.A class whose definition refers to other classes for the purpose of inheriting The classes that are designated for the purpose of inheritance are said to be the super classes of the inheriting class.
  • 6. The function class-name takes a class object and returns its nameEach class has a class precedence list, which is the total ordering on the set of the given class and its super classes.The total ordering is a list ordered from the most specific to least specific.
  • 7. Defining classesThe macro defmacro is used to define a new named class.The definition includesName of the new class.
  • 8. List of the directed super classes of the new class
  • 9. A set of slot specifiers
  • 10. A set of class optionsThe generic function make-instance creates and returns a new instance of a class.
  • 11. slotsAn object that has standard-class as its metaclass has zero or more slots.The slots of an object are determined by the class of the object.Each slot can hold one value.The default initial value of a slot is defined by the :initform slot option.
  • 12. A local slot is the one that is visible to exactly one instance, namely the one in which the slot is allocated.A shared slot is defined to be a slot that is visible to more than one instance of a given class and its subclassesA slot can be accessed in two ways: by the use of primitive function slot-value.
  • 13. By use of generic functions generated by the defclass form.InheritanceA class can inherit methods, slots and some defclass options from its super classes.A subclass inherits methods in the sense that any method applicable to all instances of a class is also applicable to all instances of any subclass of that class.Inheritance of class options:The :default-initargs class option is inheritedEx: ( defclass c1 () ((s1 :initform 5.4 :type number) (s2 :allocation :class))) Instances of class c1 have a local slot named s1, whose default initial value is 5.4
  • 14. s1 should always be a number.
  • 15. Class c1 also has a shared slot named s2.(defclass c2 (c1) ((s1 :initform 5 :type integer) (s2 :allocation :instance) (s3 :accessor c2-s3)))There is a local slot named s1 in instances of c2.
  • 16. The default initial value of s1 is 5.
  • 17. The value of s1 will be of type integer.
  • 18. There are also local slots of named s2 and s3 in instances of c2.
  • 19. The class c2 has a method for c2-s3 for reading the value of slot s3.Determining the class precedence ListThe defclass form for a class provides a total ordering on that class and its direct super classes.This ordering is called the local precedence order.The class precedence list for a class C is a total ordering on C and its super classes that is consistant with the local precedence orders for C and its super classes.
  • 20. Class precedence list ArrayBit-vectorCharacterComplexConsFloatFunction*Hash-table*IntegerListNull
  • 22. Introduction to generic functionsA generic function object contains a set of methods, lambda-list, a method combination type, and other information.A generic function can be given a global name using the defmethod and defgeneric construct.A generic function can be given a local name using generic-flet, generic-labels, or with-added-method special forms.
  • 23. Introduction to methodsA method object contains a method function, a sequence of parameter specializes which specify when the given method is applicable, a lambda-list and a sequence of qualifiers.A method-defining form contains the code that is to be run when the arguments for the generic function cause the method that it defines to be invoked.
  • 24. Congruent lambda-list for all methods of a generic function Each lambda-list must have the same number of required parametersEach lambda-list must have the same number of optional.If any lambda-list mentions &rest or &key, each lambda-list must mention one or both of them.If the generic function lambda-list mentions &key, each method must accept all of the keyword names mentioned after &key, either by accepting them explicitly, by specifying &allow-other-keys, or by specifying &rest but and &key.
  • 25. Standard method combinationStandard method combination is supported by the class standard-generic-function.Primary functions define the main action of the effective method, while auxiliary methods modify that action in one of three ways:A primary method has no method qualifier.An auxiliary method is a method whose method qualifier is :before, :after, or :aroundThe macro define-method-combination defines new forms of method combinations.It provides an effective method for customizing the production of the effective method.
  • 26. Meta objectsThe meta-object protocol specifies a set of generic functions defined by methods on classes.The instances of these classes on which those methods are defined are called meta-objects.The metaclass determines the representation of instances of its instances and the forms of inheritance used by its instances for slot descriptions and method inheritance.
  • 27. Standard Meta-classes and objectsThe common lisp provides a set of meta-classes which includeStandard-class (default class)
  • 28. Built-in-class (instances are classes that have special implementations with restricted capabilities)
  • 29. Structure-class (all classes defined by means of defstruct are instances of structure-class)Set of metaobjects provided by the common lisp include:Standard-method (default class of methods)
  • 31. instance of the class standard class
  • 32. Method-combination (every method combination object is an instance of a subclass of the class method-combination)Object creation and initializationThe generic function make-instance creates and returns a new instance of a class.The first argument is a class or the name of the class , and the remaining arguments form an initialization argument list.An initialization argument controls object creation and initialization.Keyword symbols are used to make initialization objects.A default value form can be used for an initialization argument by using the :default-initargs class option.
  • 33. Rules to specify when initialization arguments may be multiply defined:A given initialization argument can be used to initialize more than one slot if the same initialization argument name appears in more than one :initarg slot option.A given initialization argument name can appear in the lambda-list of more than one initialization method.A given initialization argument name can appear in an :initarg slot option and in the lambda-list of an initialization method.
  • 34. Redefining a classA class that is an instance of standard-class can be redefined if the new class will also be an instance of standard-class.Redefining modifies the existing class object, it does not create a new class object for the class.Any method object created by :reader, :writer, or :accessor option specified by the old defclass form the corresponding generic functions and methods specified by the new defclass form are added.
  • 35. extensionsThere are two extensions allowed for class redefinition:The object system may be extended to permit the new class to be an instance of a metaclass other than the metaclass of the old class.
  • 36. The object system may be extended to support an updating process when either the old or new class is an instance of a class other than standard-class that is not a built-in class.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