5GLs & AI
une balle d'argent
Punch Cards
Doesn't it seem quaint that people used to have to punch holes in a piece of paper to program a computer?
Machine Code
Doesn't it seem quaint that people used to have to write machine instructions to program a computer?
Memory Allocation
Doesn't it seem quant...
Oh you get the idea!
Type Checking...
Complex Data Structures...
Progress Creates Abstractions
- Think: “Necessary at the time, but thank goodness I don’t have to do it now”
- We write words into a text file...think about how silly that will seem someday.
Does George type words into a text file?

George Jetson
- Talks to the machine
- Explains his problem in English
- Gets a solution
5GLs and AI
- Programming Language Generations
- Fifth Generation Languages (specifically Prolog) and AI
- The Fifth Generation Computer from Japan
- Why 5GLs & AI were not silver bullets
- Why they might be now
- What next
Programming Language Generations
An incredibly brief history
First Generation
- Machine Code: absolutely nothing is abstracted
- The machine matters
- More than the programmer

Second Generation
- Assembly
- Useful Constructs: (MOV, XCHG, etc.)
- Essentially reusable blocks of Machine Code
- Machine still matters
- A nod to the programmer, albeit a minor one
3rd Generation
- Big Leap
-
COBOL and Fortran
-
Statements abstract concepts from computer instructions to “IF” and “DO”
-
Compiles onto multiple machines!
-
Programming is not a specific set of an instructions for a single machine
-
Programmer-centric

4th Generation
- DSLs and Object Oriented live here
- Programmer is the absolute center
- Machine Agnostic
- Performance takes a hit
- Borders on natural language
- "for thing in things:"

Trend
- Machine matters less
- Programmer matters more
Fifth Generation
(A prologue on Prolog)
5GLs
- How the kids say:
"Fifth Generation programming Languages" - Prolog isn't the only one...
- But it's the only one I learned much about
Prolog
- 5GL
- Built on Lisp
- Basic units: Facts and Rules
- Treats source code and data the same
- Queries discover relationships/truths
Knowledge Bases
happy(yolanda).
listens2Music(mia).
listens2Music(yolanda):- happy(yolanda).
playsAirGuitar(mia):- listens2Music(mia).
playsAirGuitar(yolanda):- listens2Music(yolanda).
Rules and Facts in Prolog:
http://www.learnprolognow.org/lpnpage.php?pagetype=html&pageid=lpn-htmlse1
- Yolanda is happy
- Mia listens to music
- When Yolanda listens to music, she is happy
- Mia plays air guitar when she listens to music
- Yolanda plays air guitar when she listens to music
Queries
happy(yolanda).
listens2Music(mia).
listens2Music(yolanda):- happy(yolanda).
playsAirGuitar(mia):- listens2Music(mia).
playsAirGuitar(yolanda):- listens2Music(yolanda).
?- playsAirGuitar(mia).
yes
Does Mia play air guitar? Yes.
Queries (cont'd)
loves(vincent,mia).
loves(marsellus,mia).
loves(pumpkin,honey_bunny).
loves(honey_bunny,pumpkin).
jealous(X,Y):- loves(X,Z), loves(Y,Z).
?- jealous(marsellus,W).
W = vincent
- Vincent and Mia love each other
- Marsellus and Mia love each other
- Jealousy happens between X and Y when they both love Z
- Who is Marsellus jealous of? Vincent
Declarative
- Give facts
- Ask a question
- No algorithm provided by a human
- 5GLs
Imperative
- Give step by step instructions
- Have the computer execute them exactly
- >5GLs (mostly)
Seems great!...BUT
- Creating Facts and Rules is hard (essential)
- Creating Facts and Rules is boring (accidental)
- Even figuring out the problem is hard!
- Make a computer do it!

AI driven 5GL
- AI makes the rules and facts
- AI tries various models
- AI runs the queries to see if it solves my problem
- AI gives me the solution

Japan's Fifth Generation Computer
“The objective was a machine with three major components: a problem solving and inference processing unit; a knowledge base management system; and an intelligent interface,” (1982)
TL;DR
- A Brain
- A memory
- A Voice and Senses
Lofty Goals
- Using Natural Language Processing and massive databases
- Understand human problems
- Make models
- Test models
- Relate answer

Hardware
- Parallelization not optimized yet
- Space is expensive (size and money)
- Single-core getting faster
- Slow, large, expensive
None of it up to the job
Software
- Natural Language Processing immature
- Modeled after human relational thought
- Large enough stored information
None of them up to the job
Failure kills motivation

Accidental
- Writing Code
- Running the code
- Having enough time or money
- Modeled after humans
Essential
- Requirement Solicitation
- Problem solving
Contemporary
5GLs & AI
Ein Wunderwaffe
Software
- Narrow AI is omnipresent
- Google Results
- Navigation rerouting
- Natural Language Processing
- Targeted Ads
- IBMs Watson (General AI)
- Uses Prolog!!!
Hardware
- Distributed Systems
- Bigger Brain
- The Internet
- More Memories
- Human-Interface-Devices
- Better than ever
Some thoughts on modern AI
- BG: "I don’t understand why some people are not concerned"
- SH: "The development of full artificial intelligence could spell the end of the human race."
- EM: "AI is much more advanced than people realize. It would be fairly obvious if you saw a robot walking around talking and behaving like a person... What's not obvious is a huge server bank in a vault somewhere with an intelligence that's potentially vastly greatly than what a human mind can do. "

An AI that writes software?
http://www.primaryobjects.com/2013/01/27/using-artificial-intelligence-to-write-self-modifying-improving-programs/
What next?
- Temper Expectations
- AI beyond humans is coming
- There is no reason to think writing software can only be done by humans
- Keep writing software until such a time!
Before
- Hardware lacking
- Software lacking
Now
- Hardware better
- AI genepool bigger
- Hobbyists make software that writes software
5GLs & AI
By dlindema
5GLs & AI
CIS 611 presentation on Fifth Generation Programming Languages and AI. A discussion of their use a a silver bullet for software engineering.
- 454