DOC PREVIEW
Johns Hopkins EN 600 325 - Declarative Methods

This preview shows page 1-2-3-4 out of 11 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

600.325/425 Declarative MethodsWhat is this course about?Low-level vs. high-level languagesSlide 4Slide 5Slide 6Slide 7Slide 8Slide 9Slide 10Structure of this course600.325/425 Declarative Methods - J. Eisner1600.325/425Declarative MethodsProf. Jason EisnerMWF 3-4pm (sometimes 3-4:15)600.325/425 Declarative Methods - J. Eisner2What is this course about?What do you learn in a programming course?How to use a language (e.g., Java) to solve problemsHow the computer actually executes that language(Why do you need to know this?)Ok, this is a programming courseWe’ll survey several languagesBut they aren’t normal languages!600.325/425 Declarative Methods - J. Eisner3Low-level vs. high-level languagesOne common languageCan do anything (Turing-complete)Low-level: Long, detailed programs written by anal-retentive programming gurusCompiler has limited freedom because you told it exactly what to doAssemblerCFORTRANLots of different tasksProgrammer has freedom to write anything. Hopefully has a lot of free time, too.600.325/425 Declarative Methods - J. Eisner4Useful basic classes Written by other people More abstract classes Interface is closer to howyou think about the task Low-level vs. high-level languagesJava, C++, OCaml …Lots of different tasksCompiler has limited freedom because someone told it exactly what to doAs before, but better organizedReusable building blocks (objects or modules)Building up high-level objects from low-level onesBut language and compiler are still low-level600.325/425 Declarative Methods - J. Eisner5Low-level vs. high-level languagesReally high level! Programming for the masses! Boy, wouldn’t you like to write this compiler?(take 600.465 NLP)(and 600.463 Algorithms)Englishand its obscure variants(Hindi, Chinese, German, …)A higher-level language that can also do anything (Turing-complete)optimizing600.325/425 Declarative Methods - J. Eisner6Low-level vs. high-level languages“On each line, replace every third word by x’s, then sort the words by length …”It would have to know an awful lot of concepts (line, word, third, sort, length).Maybe just make a big library of specialized objects for those concepts?Some of those objects would need to have pretty powerful methods: “Schedule the classes to minimize time conflicts.”Could we make a formal English-like language?A higher-level language that can also do anything (Turing-complete)600.325/425 Declarative Methods - J. Eisner7Low-level vs. high-level languagesA lot of the same kinds of stuff over and over, actuallySo maybe it is good to build some powerful, general, reusable objects to handle cases that are either common or hardThen you don’t waste your time doing the same kind of thing again & againAnd you don’t waste your time figuring out how to do something new & hardWhat would people write in here anyway?Another language that can do anything (Turing-complete)600.325/425 Declarative Methods - J. Eisner8Low-level vs. high-level languagesA lot of the same kinds of stuff over and over, actuallySo maybe it is good to build some powerful, general, reusable objects to handle cases that are either common or hardThen you don’t waste your time doing the same kind of thing again & againAnd you don’t waste your time figuring out how to do something new & hardSQL orDatalogSeveral specialized high-level languages“Tools for the job”Regexp patternsConstraint programsSolvers: general algorithms(sometimes can choose among several wildly different solvers)600.325/425 Declarative Methods - J. Eisner9Low-level vs. high-level languagesSQL orDatalogSeveral specialized high-level languages“Tools for the job”Regexp patternsConstraint programsSolvers: general algorithmsTo tell the database about your problem, use SQL (standard query language).More expressive than calling a database method!Query optimization – might even compile your query into machine code before running it600.325/425 Declarative Methods - J. Eisner10600.325/425 Declarative Methods - J. Eisner11Structure of this courseIntro materialWhat are languages? What do they look like?What’s a declarative language? What’s a solver?Encoding a problem in a languageReducing one language to another; NP-hardnessSeveral actual languages. For each:Week 1: How does this language let me encode interesting problems?Homework: Encode a real problem and run a solver.Week 2: What strategies does the solver use to solve arbitrary problems written in the language?Project of your choice (for 425


View Full Document

Johns Hopkins EN 600 325 - Declarative Methods

Download Declarative Methods
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Declarative Methods and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Declarative Methods 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?