0% found this document useful (0 votes)
59 views2 pages

Adjoin

LISP is a programming language consisting of atoms, lists, and S-expressions. Key LISP functions include adjoin, car, cdr, cons, head, intersection, list, member, null, recursion, sets, S-expressions, and union. Logic programming uses backward chaining to prove goals by comparing them to facts or rules, with backtracking occurring if a choice point fails. Logo is a programming language designed to teach problem solving and logical thinking through controlling a graphical turtle representation.

Uploaded by

lalitha
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views2 pages

Adjoin

LISP is a programming language consisting of atoms, lists, and S-expressions. Key LISP functions include adjoin, car, cdr, cons, head, intersection, list, member, null, recursion, sets, S-expressions, and union. Logic programming uses backward chaining to prove goals by comparing them to facts or rules, with backtracking occurring if a choice point fails. Logo is a programming language designed to teach problem solving and logical thinking through controlling a graphical turtle representation.

Uploaded by

lalitha
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

adjoin A LISP function that adds an element to a set if it is not already there.

 
The most basic building block of LISP consisting of a string of
characters beginning with a letter, digit, or any special character other
atom
than a left or right parenthesis. Examples could be "happy", "red",
"Two", "2", "3.14", and so on. 
LISP function that returns the first element of a list where the list cannot
car
be the null-list. 
cdr LISP function that returns all elements but the first element of the list. 
LISP function that takes two arguements, an S-Expression and a list, and
cons creates a new list with the first element in the new list being the first
arguement. 
head First element of a list. 
A LISP function that takes two sets and returns a set containing only the
intersection
elements that were in both of the initial sets. 
A collection of S-Expressions, called elements, enclosed in by
list parenthese. Examples could be "(a b c)", "(1, 2, 3)", "(happy, red, Two,
2, 3.14)". 
A LISP function that determines if an element is a member of a set. If it
is a member of the set then it returns the tail of the list beginning with the
member
first element that matches. If it is not a member of the set then a nil list is
returned. 
A special example of an S-Expression that is both an atom and a list.
null
Example "()". 
The ability of a program to call itself which also enables a program to
Recursion define itself in terms of itself. This is frequently used to control the
programs execution. 
sets A collection of elements. 
S-Expressions An atom, list, or collection of S-Expressions surrounded by parentheses. 
tail A list consisting of all elements of a list except the head or first element. 
A LISP function that takes two sets and returns a set containing all of the
union
elements that were in either of the original sets with no duplications. 
For More Info on the Lisp Programming Language

Logic Programming

Occurs when a backward chaining process fails after a choice point.  The
Backtracking
system returns to mthe choice point and continues to test clauses.
Backward The process used to prove goals by comparing the goals to the facts or
Chaining rules.
Choice Point A place where a particular clause is chosen.
Clause A collective term for facts and rules.
Logic A programming style based on first-order logic.  The system attempts to
Programming prove goals.
Prolog The original logic programming language.
For More Info on Logic Programming

Logo Programming Language

Logo
A computer language designed to help people learn.  It teaches problem
Programming
solving and logical thinking.  It is a dialect of LISP.
Language
Originally was a robot controlled by the logo programming language.  It
Turtle eventually moved into a graphical representation on a computer screen upon
which it could still be given directions.
For More Info on the Logo Programming Language

You might also like