language n.
Skip this Video
Loading SlideShow in 5 Seconds..
Language PowerPoint Presentation
Download Presentation

Loading in 2 Seconds...

play fullscreen
1 / 21

Language - PowerPoint PPT Presentation

  • Uploaded on

Language. A system of symbols and rules used to communicate knowledge Between humans: (e.g., Natural Language) Between machines: (e.g., Binary Code) Between human and machine (e.g., Programming Language, GUI) etc. Two Flavors of Knowledge. Explicit Facts (Potentially Infinite)

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'Language' - fearghus

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
  • A system of symbols and rules used to communicate knowledge
    • Between humans: (e.g., Natural Language)
    • Between machines: (e.g., Binary Code)
    • Between human and machine (e.g., Programming Language, GUI)
    • etc.
two flavors of knowledge
Two Flavors of Knowledge
  • Explicit
    • Facts (Potentially Infinite)
    • No computation required
    • Communication can be prohibitively inefficient
      • E.g., Table of multiplication facts rather than a procedure
  • Implicit
    • Finite Facts + Computation Procedure
    • Computation procedure is finite and explicit
    • Communication can become very efficient
      • Concise representations allows for communication (computations as needed) potentially infinite knowledge
logic as language
Logic as Language
  • Origins are Pre-Aristotle
  • A language for the explicit communication of one’s knowledge between humans
    • Explicit Facts + General purpose inference procedure
  • Frege (1879) develops modern symbolic logic, the predicate calculus, complete with proof theory - a formal language…for pure thought
  • Exploited by mathematicians and philosophers demanding tools for rigorous expression and formal, unambiguous human communication
  • Becomes the foundation for mathematical reasoning.
  • Principal developmental constraint: Human cognitive processes
the role of computers communication
The Role of Computers: Communication
  • Store and & communicate knowledge between humans
  • Use finitely expressed procedures to infer & communicate a potentially infinite amount of otherwise implicit knowledge
  • Like a Book?
  • Like a Human?:
    • Can in many cases compute faster and more accurately.
the role of communication in computing
The Role of Communication In Computing
  • Step 1: Formulation - Human Focus
    • Human communicates with Human
  • Step 2 : Program - Machine Focus
    • Human conforms and communicates with the computer
  • Step 3: Application - Human Focus
    • Computer conforms and communicates with Human
step 1 formulation
Step 1: Formulation
  • Human prepares to communicate with machine by formulating knowledge.
  • Typically communicates with other humans for accuracy and validation.
  • Logic is a classic and fundamental language.
  • Identify Goal
    • body of knowledge and
    • form of human-machine communication for step 3 (input/output)
  • Identify base knowledge
    • explicit facts required to derive body of knowledge
  • Identify computation procedure
    • Explicit procedure “algorithm” used to derive subset of knowledge representing output given input and base knowledge
steps 2 and 3
Steps 2 and 3
  • Step 2 : Program
    • Human conforms and communicates with machine
    • Human reformulates in a language the computer can process
    • Programming language becomes means of expression for human to communicate knowledge and computation procedure to machine.
  • Step 3: Application
    • Machine comforts to communicate with Human
    • Human user “queries”/”dialogs” with computer providing input
    • Computer executes program, derives, forms and communicates response to human
programming languages
Programming Languages
  • Origins -- 1940’s
  • Developed for Two Purposes:
    • For Controlling the operations of a computer AND
    • For humans to express knowledge
  • Conflicting Developmental Constraints:
    • The con Neumann architecture
    • Human cognitive processes
  • Knowledge formulation in logic is not sufficient
  • Must program the machine
    • The “program” becomes the persistent artifact of communication not the human formulation
bridging the gap
Bridging the Gap

Objects and Attributes

Automatic Inference (Inheritance)

Automatic Memory Management



ALGOL Family

Functional Family

Logic Programming



Programming Languages

Bridging the Gap


Designed for Formal Expression

and Communication of Human Knowledge

Designed to operate a machine designed to add binary numbers

logic as program
Logic as Program
  • Program
    • set of axioms
    • declarative logic statement of knowledge
  • Computation
    • Constructive proof of goal statement from a program
    • Not part of program -- an abstract machine -- like the accumulator in a VN
  • Answer: “natural” logic consequent of the program
  • Original Motivation
    • Desire to automate the proof procedure of predicate calculus so that theorems could be automatically generated by the computer
    • In general, however, this is not possible (proof by Godel)
  • Positive Impact
    • For a class of interesting problems a limited proof procedure can be useful
    • A declarative logic-based language can afford precise logical syntax and semantics based on general-purpose and “natural” computation procedure
    • A classic logic-based expression is transformed into effective computation
logic programming historical highlights
Logic Programming: Historical Highlights
  • 1965: Robinson’s Unification Algorithm and Resolution Principle mechanizes proof procedure
  • 1970’s:
    • Kowaski formulates a procedural interpretation of Horn Clause Logic. Shows that an axiom of the form:
      • A if B1 and B2 and …BN
      • Can be interpreted and executed as a procedure of a recursive program based on resolution proof procedure with unification algorithm.
    • Colmerauer develops Prolog based on Kowlaski’s procedural interpretation
    • vanEmden and Kowalski develop formal semantics for Logic Programming
    • Warren dispels myths of impracticability with an efficient implementation based on easily programmed abstract machine (the WAM)
  • 1980’s -
    • Advanced techniques execute more “logical specs” as efficient programs
    • Constraint Logic Programming as a generalization of LP allows for a framework that maintains declarative logic syntax and semantics while solving classes of CSPs as efficiently as theoretically possible.
the ideal and the reality
The Ideal and The Reality
  • Ideal
    • A problem decoratively stated in symbolic logic executes on a vonNeuman machine as efficient program
  • Benefits
    • Programming becomes classic logical specification and inherits the known benefits of formal logic as language (precise semantics and natural inference mechanism)
    • Intent and correctness of programs are more easily accessible, understood and validated by humans (and by machines)
    • Expression/Communication of domain/problem knowledge is not cluttered with knowledge about the machine or about the idiosyncrasies of managing machine resources.
  • Reality
    • Currently not ALL clear, elegant logic specifications in LP execute as efficient logic programs
      • None the less LP allows for specialized algorithms to be expressed as declarative logic programs.
    • Research in LP is focused on broaden the class of specs that do execute as efficient logic programs
lp s role in this course
LP’s Role in this Course
  • Course focus
    • AI and Knowledge Representation and Automated Reasoning
    • How computers can help HUMANS capture, compute and communicate knowledge.
  • Logic Programming
    • Has close ties to formal logic - the tried and true foundation for the formal representation and communication of human knowledge
    • Provides a programming foundation for formally representing knowledge and inference
    • Allows us, as software engineers, to write programs ignoring machine issues (e.g., memory structure and management) and to concentrate on knowledge representation, human reasoning and formal human communication.
why applications in document generation
Why Applications in Document Generation
  • Encompass a broad range of AI topics and techniques
  • Documents are themselves human communication artifacts
    • They are produced by some process
    • The represent and communicate knowledge through language
  • The act of authoring documents can range
    • From the very creative (fictional literature)
    • To the very unimaginative and simplistic (filling in a form)
    • And include things in between like finding, weaving together and refining previous written text to form a new document
  • Exploring how we might model the human processes involved in document authoring requires ideas about how we might represent and reason about knowledge, language and the human creative processes.
  • Great foundation for exploring the potential and the limits of the role of computers in human creativity and communication
course overview
Course Overview
  • Logical Foundations
    • Properties and Mechanics of Classic Symbolic Logic
  • Logic Programming and PROLOG
    • Practical tool kit for implementing knowledge-based systems
  • Knowledge Representation
    • Basic techniques for modeling common-sense domains
  • Three Applications
    • Brutus -- Creative Writing
    • DocCon -- Business document authoring, knowledge management and reuse
    • Test Generation
  • Background
    • Academic research in automatic story generation
    • Designed to explore computational models of human creative authorship
    • Developed in Prolog (FLEX)
  • Focus
    • What kinds of knowledge is represented
    • What kinds of processes are modeled
    • What kinds of automatic reasoning techniques are used
    • How is natural language used
  • Students will have an opportunity to explore and extend the code
  • Background
    • Commercial System developed at an RPI incubator company, Document Development Corporation, in collaboration with IBM Research
    • Designed to assist in managing and reusing document knowledge to assist in authoring business documents
    • Carefully engineered and developed a variety of languages (Java, C, Delphi)
  • Focus
    • Business Problem
    • System architecture
    • Document Knowledge Representation Scheme
    • Interactive Document Configuration
  • Students will have an opportunity to develop authoring solutions for a class of documents using DocCon
transitive closure version 0
Transitive Closure Version 0


%Version 0

% - Direct Rep of logic

% - Does not terminate (Try :- closure(1,3) for test0)

% - Inefficient


closure0(X,Y) :- base(X,Y). %arcs in graph

closure0(X,Z) :- closure0(X,Y), closure0(Y,Z). %transitive step

transitive closure version 1
Transitive Closure Version 1


%Version 1

% - A little less Direct Rep of logic

% - Terminates for acyclic graphs

% - works on test0 but not on test1.

% - Still Inefficient


closure1(X,Y) :- base(X,Y).

closure1(X,Z) :- base(X,Y), closure1(Y,Z).

transitive closure version 2
Transitive Closure Version 2


%Version 2

% - A little less direct rep of logic

% - Terminates for cyclic and acyclic graphs

% - skips visited nodes

% - works on test0 and test1

% - Inefficient - Traverses all paths when only need one.


closure2(X,Y) :-


closure2a(X,Y,_) :- base(X,Y).

closure2a(X,Z,Avoiding) :-



closure2a(Y,Z,[Y | Avoiding]).

transitive closure version 3
Transitive Closure Version 3


%Version 3

% - Warshalls algorithm for transitive closure in Prolog

% - Indirect Rep of logic

% - Terminates for cyclic and acyclic graphs

% - Efficient (Does not visit unnecessary paths)


% "Very often you will be tempted to think that it is time

% to abandon Prolog for C. Often you will do better to replace

% a specification (in Prolog) by a program (in Prolog)."


% Good algorithms are important no matter what programming Language.