Generating Pieces of Web Applications with Type-Level Programming

Slides:



Advertisements
Similar presentations
.NET 3.5 SP1 New features Enhancements Visual Studio 2008 SP1 New features Enhancements Additional features/enhancements.
Advertisements

Extended DISC Online System User Instruction: How to Run a Team Analysis.
Query Methods (SQL). What is SQL A programming language for databases. SQL (structured Query Language) It allows you add, edit, delete and run queries.
PHP Hypertext Preprocessor Information Systems 337 Prof. Harry Plantinga.
CONTENTdm Important Features and Capabilities. CONTENTdm provides an “out of the box” solution to a complex web programming challenge. With minimal customization,
U of R eXtensible Catalog Team MetaCat. Problem Domain.
MIS2502: Data Analytics MySQL and SQL Workbench David Schuff
Ruby on Rails Creating a Rails Application Carol E Wolf CS396X.
Object Oriented Databases by Adam Stevenson. Object Databases Became commercially popular in mid 1990’s Became commercially popular in mid 1990’s You.
1 Working with MS SQL Server. 2 Objectives You will be able to Use Visual Studio for GUI based interactive access to a Microsoft SQL Server database.
UC Berkeley Hello Rails. Review: MVC Goal: separate organization of data (model) from UI & presentation (view) by introducing controller –mediates user.
Session 5: Working with MySQL iNET Academy Open Source Web Development.
Simple Database.
Information Systems: Databases Define the role of general information systems Describe the elements of a database management system (DBMS) Describe the.
HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts Database Design.
Introduction to Entity Framework Part 2 CRUD Scaffolding Tom Perkins NTPCUG.
CSC-682 Cryptography & Computer Security Sound and Precise Analysis of Web Applications for Injection Vulnerabilities Pompi Rotaru Based on an article.
Ruby on Rails CSE 190M, Spring 2009 Week 6. Overview How to use a database Demo creating a blog application on Rails Explain how the application works.
Relational Databases Database Driven Applications Retrieving Data Changing Data Analysing Data What is a DBMS An application that holds the data manages.
Binding UI Components to Data. Adding UI Components to the Page You can create components on a page by: Dragging a component from the Component Palette.
Lap Around Visual Studio 2008 &.NET 3.5 Enhancements.
11 Using ADO.NET II Textbook Chapter Getting Started Last class we started a simple example of using ADO.NET operations to access the Addresses.
Oracle Data Integrator Transformations: Adding More Complexity
CS1100: Microsoft Access Managing Data in Relational Databases Created By Martin Schedlbauer CS11001Microsoft Access - Introduction.
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Search Overview Search Features: WSS and Office Search Architecture Content Sources and.
TAKE – A Derivation Rule Compiler for Java Jens Dietrich, Massey University Jochen Hiller, TopLogic Bastian Schenke, BTU Cottbus/REWERSE.
Information Systems Today: Managing in the Digital World TB3-1 3 Technology Briefing Database Management “Modern organizations are said to be drowning.
Planning & Creating a Database By Ms. Naira Microsoft Access.
CEOS CWIC Report: Metadata Mapping Table Cocoa Beach, FL WGISS-37, April 2014 Michael Morahan
Connecting to External Data. Financial data can be obtained from a number of different data sources.
MYSQL AND MYSQL WORKBENCH MIS2502 Data Analytics.
Application generation Peter Bell SystemsForge Peter Bell SystemsForge Beyond Scaffolding.
School of Informatics University of Edinburgh An Introduction to Ruby on Rails Ken Dawson.
Ur/Web: A Simple Model for Programming the Web
Feature-Level Modularity in Ur/Web Adam Chlipala WG 2.16 meeting, August 2013.
Safe Database Abstractions with Type-Level Record Computation Adam Chlipala RADICAL 2010.
Ur/Web, a Domain-Specific Functional Programming Language for Modern Web Applications Adam Chlipala.
Ur/Web: A Statically-Typed Language for Building Web Applications from Components Adam Chlipala Emerging Languages Camp 2010.
Ur: Statically-Typed Metaprogramming with Type-Level Record Computation Adam Chlipala PLDI 2010.
CIS Host Manager Bryce Johnston CIS 597 May 8, 2009.
Introduction The concept of a web framework originates from the basic idea that every web application obtains its foundations from a similar set of guidelines.
DBMS and SQL.
Top 8 Best Programming Languages To Learn
Database Systems: Design, Implementation, and Management Tenth Edition
mysql and mysql workbench
Static Checking of Dynamically-Varying Security Policies in Database-Backed Applications Adam Chlipala OSDI 2010.
Building A Web-based University Archive
PRG 421 MART Higher Education / prg421mart.com
Power Apps & Flow for Microsoft Dynamics SL
Searching Business Data with MOSS 2007 Enterprise Search
Populating a Data Warehouse
System And Application Software
MIS2502: Data Analytics MySQL and SQL Workbench
CS122 Using Relational Databases and SQL
EndNote What is EndNote? EndNote Library, how to manage?
Convert (flatten) IATI XML file to CSV file(s) using XQUERY
Creating and Managing Database Tables
CS1222 Using Relational Databases and SQL
Chapter 18 Finalizing a Database.
The use of plugins A plugin (or plug-in, or extension) is a component that adds a specific feature to the “standard” Handbook on IT Audit for Supreme Audit.
ບົດທີ 6 ການຄຸ້ມຄອງຊັບພະຍາກອນຂໍ້ມູນ (Managing Data Resource)
Some Programming Paradigms
ADO.NET Entity Framework
Database SQL.
New Technologies for Storage and Display of Meteorological Data
CS122 Using Relational Databases and SQL
Entity Framework & LINQ (Language Integrated Query)
Getting Productive with ASP.NET MVC 3
End of day Calculator and special order parts tracking
Martin Rinard, Jiasi Shen, Varun Mangalick
Presentation transcript:

Generating Pieces of Web Applications with Type-Level Programming Adam Chlipala DTP 2010

Verification Types Programmer Effort Strength of Guarantee Ur/Web, Dependent Types Ur/Web, a domain-specific language for metaprogramming Web applications Type-Level Computation Web Applications Programmer Effort Strength of Guarantee

Object-Relational Mapping SQL Table Schema Metaprogram Object-Oriented Interface Add row Modify row Search ...

Automatic Admin Interface SQL Table Schema Id A B C D Metaprogram

In-Browser Spreadsheet

Ad-Hoc Code Generation? Edit some source files to customize.... Now change the database schema.... app models post.rb views posts index.html.erb show.html.erb config routes.rb .... ? SQL Table Schema Id A B C D Metaprogram script/generate scaffold T Id:int A:string B:float C:string D:int

Library uses reflection to behave differently based on object metadata Run-Time Reflection? Library uses reflection to behave differently based on object metadata How do we know that this library is correct? How can we be sure that the library never produces code vulnerable to code injection attacks or other failures of abstraction? SQL Table Schema Id A B C D

A Solution Inspired by Dependent Typing Metaprogram (Static type guarantees correct operation!) Uses type-level computation Code-level iteration over types SQL Table Schema Id A B C D Guaranteed free of injection vulnerabilities, for any metaprogram input

Core Language Features  ::= Type |    | Name | {}  ::=    |  | ∀ :: .  |   |  :: .  | #n | [] | [ = ] |  ++  | $ | map | [ ~ ]   e ::= x | e e | x : . e | e [] |  :: . e | {} | { = e} | e. | e –  | e ++ e | [ ~ ]  e | e ! Convert “type-level record” to “record type” Apply a function to every field of a record Guarded type: require that two type-level records share no field names Literal field name Empty record Singleton record Record concatenation For type-level record field names For type-level records Empty record Singleton record Field projection Record concatenation Field removal Guarded expression abstraction: require that two type-level records share no field names Guard elimination

The Type-Checker is Clever Algebraic laws are applied automatically: 1 ++ 2 = 2 ++ 1 1 ++ (2 ++ 3) = (1 ++ 2) ++ 3 map (. )  =  map f (1 ++ 2) = map f 1 ++ map f 2 map f (map g ) = map (f ○ g) 

Ur/Web Available At: http://www.impredicative.com/ur/ Including online demos with syntax-highlighted source code