CS 267: Automated Verification. Lecture 18, Part 2: Data Model Analysis for Web Applications. Instructor: Tevfik Bultan

Size: px
Start display at page:

Download "CS 267: Automated Verification. Lecture 18, Part 2: Data Model Analysis for Web Applications. Instructor: Tevfik Bultan"

Transcription

1 CS 267: Automated Verification Lecture 18, Part 2: Data Model Analysis for Web Applications Instructor: Tevfik Bultan

2 Web Application Depability 2

3 Web Application Depability 3

4 Web Application Depability President Obama: I want to go in and fix myself, but I don't write code"

5 Web Application Depability TRACKS: A todo list applica2on Context Recurring Todo Feed the Dog EDIT 5

6 Web Application Architecture Data Model OOP ORM Rel Db RESTful Controller View Model View Controller (MVC) pa;ern: Ruby on Rails, Z for PHP, CakePHP, Struts for Java, Django for Python, Object Rela2onal Mapping (ORM) Ac2veRecord, Hibernate, 6

7 An Example Rails Data Model Static Data Model class User < ActiveRecord::Base has_many :todos has_many :projects class Project < ActiveRecord::Base belongs_to :user has_many :todos has_many :notes class Todo < ActiveRecord::Base belongs_to :user belongs_to :project class Note < ActiveRecord::Base belongs_to :project Data Model Updates: Actions class ProjectsController < ApplicationController def = do note respond_to(...) 7

8 Static Data Model Ac2veRecord class declara2ons sets of objects Ac2veRecord associa2on declara2ons has_one, has_many, belongs_to, has_and_belongs_to_many Associa2on declara2ons can be used to declare the three basic types of rela2ons between classes one-to-one one-to-many many-to-many 8

9 Extensions to Static Data Model :through Op2on To express rela2ons which are composi2on of other rela2ons :condi2ons Op2on To relate a subset of objects to another class :polymorphic Op2on To express polymorphic rela2onships :depent Op2on On delete, this op2on expresses whether to delete the associated objects or not 9

10 The :through Option class User < ActiveRecord::Base has_one :profile has_many :photos, :through => :profile class Profile < ActiveRecord::Base belongs_to :user has_many :photos class Photo < ActiveRecord::Base belongs_to :profile Profile * User 1 * Photo 10

11 The :depent Option class User < ActiveRecord::Base has_one :profile, :depent => :destroy class Profile < ActiveRecord::Base belongs_to :user has_many :photos, :depent => :destroy User Profile * Photo :delete directly delete the associated objects without looking at its depencies :destroy first checks whether the associated objects themselves have associa2ons with the :depent op2on set 11

12 Data Model Formalize the sta2c data model as A set of classes A set of rela2ons between those classes A set of constraints on the rela2ons that are imposed by the associa2on declara2ons Given a formal data model we can automa2cally check if a given property holds for the data model Automated verifica2on determines: Do the constraints of the data model imply the property? 12

13 Data Model Ac+veRecord Bound n Model Extrac2on Property BOUNDED VERIFICATION bound formal data model + property UNBOUNDED VERIFICATION Alloy Analyzer formula Alloy Encoder SMT-LIB Encoder formula SMT Solver instance or unsat Results Interpreter Results Interpreter instance or unsat or unknown 13 Property Verified Property Failed + Counterexample Unknown

14 How Automated is Automated All except one step: Property specifica2on Example: It is possible to have a User who does not have any Photos. In Alloy: pred prop { all s: PreState some u: User all p: Photo (p not in (s.photo_user).u) } In SMT-LIB: (assert (exists ((a PolymorphicClass)) (forall ((p Photo)) (and (isuser a) (not (= p (a user_photo p)))) ))) Can we make it easier? 14

15 Property Templates Property templates for property specifica2on Language-neutral Do not require familiarity with SMT-LIB and Alloy Example property template: noorphans[classa, classb] To check that dele2ng an object from classa does not cause related objects in classb to be orphaned Easily rerun tool and switch the verifica2on technique, without having to rewrite the property We developed seven property templates for the most common data model proper2es 15

16 Can We Do More?

17 Automatic Property Inference Automa2cally infer proper2es based on data model schema Data model schema: A directed, annotated graph that represents the rela2ons Look for pa;erns in the data model schema and infer a property if a pa;ern that corresponds to a property appears For example, orphan preven2on n 17

18 Can Automated We Do Even Data More? Model Repair noorphans(x, Y) property failing means dele2ng an object from class X creates an orphan chain that starts with associated object in class Y Repair: Set :depent op2on to :destroy on associa2on declara2on in class X and on remaining rela2ons in the chain that starts with class Y... X Y... N Set :depent => :destroy on all relations in chain 18

19 Summary Formal Data Model Formal Data Model + Proper2es Ac2ve Records Verifica2on Results Model Extrac2on Property Inference Verifica2on for failing proper2es Data Model Repair 19

20 Experiment Results Applica+on Property Type # Inferred # Timeout # Failed deletepropagates LovdByLess noorphans transi2ve deletepropagates Substruct noorphans transi2ve deletepropagates Tracks noorphans transi2ve deletepropagates FatFreeCRM noorphans transi2ve deletepropagates OSR noorphans transi2ve TOTAL

21 Property Type # Data Model & Applica+on Errors # Data Model Errors # Failures Due to Rails Limita+ons # False Posi+ves deletepropagates noorphans transi2ve deletepropagates noorphans transi2ve deletepropagates noorphans transi2ve deletepropagates noorphans transi2ve deletepropagates noorphans transi2ve TOTAL

22 What About Data Model Actions? Static Data Model class User < ActiveRecord::Base has_many :todos has_many :projects class Project < ActiveRecord::Base belongs_to :user has_many :todos has_many :notes class Todo < ActiveRecord::Base belongs_to :user belongs_to :project class Note < ActiveRecord::Base belongs_to :project Data Model Updates: Actions class ProjectsController < ApplicationController def = do note respond_to(...) 22

23 of Data Model Actions 23

24 Abstract Data Stores Rails class User has_many :todos has_many :projects class Project belongs_to :user has_many :todos has_many :notes class Todo belongs_to :user belongs_to :project class Note belongs_to :project Abstract Data Store class User { 0+ Todo todos inverseof user 0+ Project projects inverseof user } class Project { 0..1 User user 0+ Todo todos inverseof project 0+ Note notes inverseof project } class Todo { 0..1 User user 0..1 Project project } class Note { 0..1 Project project } 24

25 Abstract Data Stores def = Project.find( do note respond_to(...) action project_destroy() { at_project = oneof(allof(project)) foreach note: at_project.notes { delete note } delete at_project } invariant(forall{ project!project.user.empty? }) invariant(forall{ user user.projects.todos.include? (user) }) forall(project project: not empty(project.user) ) forall(user user: user in user.projects.todos.users ) 25 Our library allows developers to specify invariants in native Ruby

26 Extraction Extrac2on is hard for ac2ons Dynamic type system Metaprogramming Eval Ghost Methods such as: User.find_by_name( Rob ) Observa2ons The schema is sta2c Ac2on declara2ons are sta2c ORM classes and methods do not change their seman2c during execu2on even if the implementa2on code is generated dynamically 26

27 Extraction via Instrumented Execution Boot-up the Rails run2me in a simulated environment Without opening sockets or connec2ng to the database Prepare ac2on methods for extrac2on ORM opera2ons will record their invoca2on instead of communica2ng with the database Method calls propagate instrumenta2on just before execu2on Extrac2on is path insensi2ve, execu2ng both branches subsequently Trigger an HTTP request that triggers an ac2on 27

28 via Translation to FOL A predicate is generated for each class and associa2on User(o) means that o is an instance of User Project_user(t) means that t represents an associa2on between a Project object and User object Type system constraints become axioms u: User(u) (Project(u) Todo(u)...) Cardinality of associa2ons is expressed through axioms eg. 0..1: t 1, t 2 : (Project_user(t 1 ) Project_user(t 2 ) Project_user_lhs(t 1 ) = Project_user_lhs(t 2 )) Project_user_rhs(t 1 ) = Project_user_rhs(t 2 ) 28

29 Translation of Statements to FOL An ac2on is a sequen2al composi2on of statements. Statements A state is represented with a predicate deno2ng all en22es that exist in a state A statement is a migra2on between states e.g., a create Note statement: pre_state(newly_created()) t: post_state(t) Note_project_lhs(t) = newly_created() o: (post_state(o) (pre_state(o) o = newly_created())) 29

30 Translation of Loops to FOL We only support ForEach loops (for now) They correspond to universal quan2fica2on Statements can execute mul2ple 2mes in loops Contexts to differen2ate itera2ons Ordering of itera2ons Itera2on interdepence 30

31 Inductive Inv(s) is a formula deno2ng that all invariants hold in state s Ac3on(s, s ) is a formula deno2ng that the ac2on may transi2on from state s to state s Check if: s, s : Inv(s) Ac2on(s, s ) Inv(s ) 31

32 Experiments Experimented on 3 open source Rails applica2ons FatFreeCRM, Tracks, Kandan 272 actions, 23 invariants Iden2fied 4 bugs Reported to original developers All immediately confirmed and, since, fixed Missed by previous verifica2on efforts on these applica2ons 32

33 Experiments 33

34 Publications Jaideep Nijjar and Tevfik Bultan. Bounded Verifica+on of Ruby on Rails Data Models. In Proc. Interna3onal Symposium on So>ware Tes3ng and Analysis (ISSTA), pages 67 77, Jaideep Nijjar and Tevfik Bultan. Unbounded Data Model Verifica+on Using SMT Solvers. In Proc. 27th IEEE/ACM Int. Conf. Automated So>ware Engineering (ASE), pages , Jaideep Nijjar, Ivan Bocic and Tevfik Bultan. An Integrated Data Model Verifier with Property Templates. In Proc. 1st FME Workshop on Formal Methods in So>ware Engineering (FormaliSE 2013). Jaideep Nijjar and Tevfik Bultan. Data Model Property Inference and Repair. In Proc. Interna3onal Symposium on So>ware Tes3ng and Analysis (ISSTA), pages , Ivan Bocic, and Tevfik Bultan. Induc+ve Verifica+on of Data Model Invariants for Web Applica+ons. In Proc. Interna3onal Conference on So>ware Engineering (ICSE), 2014 Jaideep Nijjar, Ivan Bocic, and Tevfik Bultan. Data Model Property Inference, Verifica+on and Repair for Web Applica+ons. (Submi;ed to ACM Transla3ons on So>ware Engineering and Methodology). 34

Data Model Property Inference and Repair

Data Model Property Inference and Repair Data Model Property Inference and Repair Jaideep Nijjar, Tevfik Bultan Department of Computer Science University of California Santa Barbara, CA USA {jaideepnijjar,bultan}@cs.ucsb.edu ABSTRACT Nowadays

More information

Analysis and Verification of Web Application Data Models

Analysis and Verification of Web Application Data Models UNIVERSITY OF CALIFORNIA Santa Barbara Analysis and Verification of Web Application Data Models A Dissertation submitted in partial satisfaction of the requirements for the degree of Doctor of Philosophy

More information

Inductive Verification of Data Model Invariants for Web Applications

Inductive Verification of Data Model Invariants for Web Applications Inductive Verification of Data Model Invariants for Web Applications Ivan Bocić and Tevfik Bultan Department of Computer Science University of California, Santa Barbara, USA {bo,bultan}@cs.ucsb.edu ABSTRACT

More information

Data Model Verification via Theorem Proving

Data Model Verification via Theorem Proving UNIVERSITY of CALIFORNIA Santa Barbara Data Model Verification via Theorem Proving A Dissertation submitted in partial satisfaction of the requirements for the degree Doctor of Philosophy in Computer Science

More information

Vulnerability Analysis (III): Sta8c Analysis

Vulnerability Analysis (III): Sta8c Analysis Computer Security Course. Vulnerability Analysis (III): Sta8c Analysis Slide credit: Vijay D Silva 1 Efficiency of Symbolic Execu8on 2 A Sta8c Analysis Analogy 3 Syntac8c Analysis 4 Seman8cs- Based Analysis

More information

Symbolic Model Extraction for Web Application Verification

Symbolic Model Extraction for Web Application Verification Symbolic Model Extraction for Web Application Verification Ivan Bocić and Tevfik Bultan Department of Computer Science University of California Santa Barbara, USA {bo,bultan}@cs.ucsb.edu Abstract Modern

More information

Review. Asser%ons. Some Per%nent Ques%ons. Asser%ons. Page 1. Automated Tes%ng. Path- Based Tes%ng. But s%ll need to look at execu%on results

Review. Asser%ons. Some Per%nent Ques%ons. Asser%ons. Page 1. Automated Tes%ng. Path- Based Tes%ng. But s%ll need to look at execu%on results Review Asser%ons Computer Science 521-621 Fall 2011 Prof. L. J. Osterweil Material adapted from slides originally prepared by Prof. L. A. Clarke Dynamic Tes%ng Execute program on real data and compare

More information

Program Verification (Rosen, Sections 5.5)

Program Verification (Rosen, Sections 5.5) Program Verification (Rosen, Sections 5.5) TOPICS Program Correctness Preconditions & Postconditions Program Verification Assignments Composition Conditionals Loops Proofs about Programs Why study logic?

More information

RV: A Run'me Verifica'on Framework for Monitoring, Predic'on and Mining

RV: A Run'me Verifica'on Framework for Monitoring, Predic'on and Mining RV: A Run'me Verifica'on Framework for Monitoring, Predic'on and Mining Patrick Meredith Grigore Rosu University of Illinois at Urbana Champaign (UIUC) Run'me Verifica'on, Inc. (joint work with Dongyun

More information

Automated System Analysis using Executable SysML Modeling Pa8erns

Automated System Analysis using Executable SysML Modeling Pa8erns Automated System Analysis using Executable SysML Modeling Pa8erns Maged Elaasar* Modelware Solu

More information

Proofs about Programs

Proofs about Programs Proofs about Programs Program Verification (Rosen, Sections 5.5) TOPICS Program Correctness Preconditions & Postconditions Program Verification Assignment Statements Conditional Statements Loops Composition

More information

iuml-b Class Diagrams 1

iuml-b Class Diagrams 1 iuml-b Class Diagrams 1 Mo3va3on Provide a more approachable interface for newcomers to Event-B Provide diagrams to help visualise models Provide extra modelling features to Event-B Sequencing of Events

More information

Homework 1 Simple code genera/on. Luca Della Toffola Compiler Design HS15

Homework 1 Simple code genera/on. Luca Della Toffola Compiler Design HS15 Homework 1 Simple code genera/on Luca Della Toffola Compiler Design HS15 1 Administra1ve issues Has everyone found a team- mate? Mailing- list: cd1@lists.inf.ethz.ch Please subscribe if we forgot you 2

More information

Mo;va;on. Program Equivalence. Performance. Goal. More Pain, More Gain 10/27/15. Program Equivalence. (slides due to Rahul Sharma)

Mo;va;on. Program Equivalence. Performance. Goal. More Pain, More Gain 10/27/15. Program Equivalence. (slides due to Rahul Sharma) Mo;va;on Program Equivalence Verifica/on is specifica/on- limited We need specifica/ons to verifica/on And specifica/ons are hard to come by (slides due to Rahul Sharma) Much research focuses on well-

More information

Effec%ve So*ware. Lecture 9: JVM - Memory Analysis, Data Structures, Object Alloca=on. David Šišlák

Effec%ve So*ware. Lecture 9: JVM - Memory Analysis, Data Structures, Object Alloca=on. David Šišlák Effec%ve So*ware Lecture 9: JVM - Memory Analysis, Data Structures, Object Alloca=on David Šišlák david.sislak@fel.cvut.cz JVM Performance Factors and Memory Analysis» applica=on performance factors total

More information

Object Oriented Design (OOD): The Concept

Object Oriented Design (OOD): The Concept Object Oriented Design (OOD): The Concept Objec,ves To explain how a so8ware design may be represented as a set of interac;ng objects that manage their own state and opera;ons 1 Topics covered Object Oriented

More information

Document Databases: MongoDB

Document Databases: MongoDB NDBI040: Big Data Management and NoSQL Databases hp://www.ksi.mff.cuni.cz/~svoboda/courses/171-ndbi040/ Lecture 9 Document Databases: MongoDB Marn Svoboda svoboda@ksi.mff.cuni.cz 28. 11. 2017 Charles University

More information

Objec+ves. Review. Basics of Java Syntax Java fundamentals. What are quali+es of good sooware? What is Java? How do you compile a Java program?

Objec+ves. Review. Basics of Java Syntax Java fundamentals. What are quali+es of good sooware? What is Java? How do you compile a Java program? Objec+ves Basics of Java Syntax Java fundamentals Ø Primi+ve data types Ø Sta+c typing Ø Arithme+c operators Ø Rela+onal operators 1 Review What are quali+es of good sooware? What is Java? Ø Benefits to

More information

How to sleep *ght and keep your applica*ons running on IPv6 transi*on. The importance of IPv6 Applica*on Tes*ng

How to sleep *ght and keep your applica*ons running on IPv6 transi*on. The importance of IPv6 Applica*on Tes*ng How to sleep *ght and keep your applica*ons running on IPv6 transi*on The importance of IPv6 Applica*on Tes*ng About this presenta*on It presents a generic methodology to test the IPv6 func*onality of

More information

Generating Small Countermodels. Andrew Reynolds Intel August 30, 2012

Generating Small Countermodels. Andrew Reynolds Intel August 30, 2012 Generating Small Countermodels using SMT Andrew Reynolds Intel August 30, 2012 Acknowledgements Intel Corporation AmitGoel, Sava Krstic University of Iowa Cesare Tinelli, Francois Bobot New York University

More information

Principles of Programming Languages

Principles of Programming Languages Principles of Programming Languages h"p://www.di.unipi.it/~andrea/dida2ca/plp- 14/ Prof. Andrea Corradini Department of Computer Science, Pisa Lesson 18! Bootstrapping Names in programming languages Binding

More information

CS 4604: Introduc0on to Database Management Systems. B. Aditya Prakash Lecture #4: SQL---Part 2

CS 4604: Introduc0on to Database Management Systems. B. Aditya Prakash Lecture #4: SQL---Part 2 CS 4604: Introduc0on to Database Management Systems B. Aditya Prakash Lecture #4: SQL---Part 2 Overview - detailed - SQL DML other parts: views modifications joins DDL constraints Prakash 2016 VT CS 4604

More information

Model Transforma.on. Krzysztof Czarnecki Genera.ve So:ware Development Lab University of Waterloo, Canada gsd.uwaterloo.ca

Model Transforma.on. Krzysztof Czarnecki Genera.ve So:ware Development Lab University of Waterloo, Canada gsd.uwaterloo.ca Model Transforma.on Krzysztof Czarnecki Genera.ve So:ware Development Lab University of Waterloo, Canada gsd.uwaterloo.ca Modeling Wizards Summer School, Oct. 1, 2010, Oslo, Norway What is model transforma.on?

More information

A System for Genera/ng Sta/c Analyzers for Machine Instruc/ons (TSL)

A System for Genera/ng Sta/c Analyzers for Machine Instruc/ons (TSL) Seminar on A System for Genera/ng Sta/c Analyzers for Machine Instruc/ons (TSL) Junghee Lim, Univ. of Wisconsin Madison, USA and Thomas Reps, GrammaTech, USA Presenter : Anand Ramkumar S Universitat des

More information

(Func&onal (Programming (in (Scheme)))) Jianguo Lu

(Func&onal (Programming (in (Scheme)))) Jianguo Lu (Func&onal (Programming (in (Scheme)))) Jianguo Lu 1 Programming paradigms Func&onal No assignment statement No side effect Use recursion Logic OOP AOP 2 What is func&onal programming It is NOT what you

More information

RTP Taxonomy & Rela.onships

RTP Taxonomy & Rela.onships RTP Taxonomy & Rela.onships dra%- lennox- raiarea- rtp- grouping- taxonomy- 03 IETF 88 @Authors 1 Changes Since - 02 Major re- write Sec.on 2, Concepts, re- structured to a conceptual media chain with

More information

Preliminary ACTL-SLOW Design in the ACS and OPC-UA context. G. Tos? (19/04/2016)

Preliminary ACTL-SLOW Design in the ACS and OPC-UA context. G. Tos? (19/04/2016) Preliminary ACTL-SLOW Design in the ACS and OPC-UA context G. Tos? (19/04/2016) Summary General Introduc?on to ACS Preliminary ACTL-SLOW proposed design Hardware device integra?on in ACS and ACTL- SLOW

More information

Implemen'ng OCaml in OCaml

Implemen'ng OCaml in OCaml 1 An OCaml defini'on of OCaml evalua'on, or, Implemen'ng OCaml in OCaml COS 326 David Walker Princeton University slides copyright 2013-2015 David Walker and Andrew W. Appel permission granted to reuse

More information

CISC327 - So*ware Quality Assurance

CISC327 - So*ware Quality Assurance CISC327 - So*ware Quality Assurance Lecture 8 Introduc

More information

Genericity. Philippe Collet. Master 1 IFI Interna3onal h9p://dep3nfo.unice.fr/twiki/bin/view/minfo/sofeng1314. P.

Genericity. Philippe Collet. Master 1 IFI Interna3onal h9p://dep3nfo.unice.fr/twiki/bin/view/minfo/sofeng1314. P. Genericity Philippe Collet Master 1 IFI Interna3onal 2013-2014 h9p://dep3nfo.unice.fr/twiki/bin/view/minfo/sofeng1314 P. Collet 1 Agenda Introduc3on Principles of parameteriza3on Principles of genericity

More information

Symbolic Execu.on. Suman Jana

Symbolic Execu.on. Suman Jana Symbolic Execu.on Suman Jana Acknowledgement: Baishakhi Ray (Uva), Omar Chowdhury (Purdue), Saswat Anand (GA Tech), Rupak Majumdar (UCLA), Koushik Sen (UCB) What is the goal? Tes.ng Tes%ng approaches are

More information

Automated UI tests for Mobile Apps. Sedina Oruc

Automated UI tests for Mobile Apps. Sedina Oruc Automated UI tests for Mobile Apps Sedina Oruc What I ll be covering Ø Basics Ø What are UI tests? Ø The no@on of Emulator and Simulator Ø What are our challenges? Ø PlaForm specific UI tes@ng frameworks

More information

Strategies for Rapid Web Prototyping. Ruby on Rails. Clemens H. Cap

Strategies for Rapid Web Prototyping. Ruby on Rails. Clemens H. Cap Strategies for Rapid Web Prototyping Ruby on Rails Strategies for Rapid Web Prototyping DRY: Don't repeat yourself Convention over Configuration Separation of Concern Templating MVC: Model View Controler

More information

Design Principles & Prac4ces

Design Principles & Prac4ces Design Principles & Prac4ces Robert France Robert B. France 1 Understanding complexity Accidental versus Essen4al complexity Essen%al complexity: Complexity that is inherent in the problem or the solu4on

More information

Synthesizing Memory Models

Synthesizing Memory Models Synthesizing Memory Models from Framework Sketches and Litmus Tests James Bornholt Emina Torlak University of Washington Memory consistency models define memory reordering behaviors on mul>processors Memory

More information

Automata-based Model Counting for String Constraints. Abdulbaki Aydin, Lucas Bang, Tevfik Bultan

Automata-based Model Counting for String Constraints. Abdulbaki Aydin, Lucas Bang, Tevfik Bultan Automata-based Model Counting for String Constraints Abdulbaki Aydin, Lucas Bang, Tevfik Bultan https://vlab.cs.ucsb.edu Model Counting for String Constraints Automata-Based model Counter (ABC) 2 Can you

More information

Symbolic and Concolic Execution of Programs

Symbolic and Concolic Execution of Programs Symbolic and Concolic Execution of Programs Information Security, CS 526 Omar Chowdhury 10/7/2015 Information Security, CS 526 1 Reading for this lecture Symbolic execution and program testing - James

More information

Ibis: A Provenance Manager for Mul5 Layer Systems. Christopher Olston & Anish Das Sarma Yahoo! Research

Ibis: A Provenance Manager for Mul5 Layer Systems. Christopher Olston & Anish Das Sarma Yahoo! Research Ibis: A Provenance Manager for Mul5 Layer Systems Christopher Olston & Anish Das Sarma Yahoo! Research Mo5va5on: Many Sub Systems workflow manager e.g. Oozie inges5on dataflow programming framework e.g.

More information

Design pa*erns. Based on slides by Glenn D. Blank

Design pa*erns. Based on slides by Glenn D. Blank Design pa*erns Based on slides by Glenn D. Blank Defini6ons A pa#ern is a recurring solu6on to a standard problem, in a context. Christopher Alexander, a professor of architecture Why would what a prof

More information

Managed So*ware Installa1on with Munki

Managed So*ware Installa1on with Munki Managed So*ware Installa1on with Munki Jon Rhoades St Vincent s Ins1tute & University of Melbourne jrhoades@svi.edu.au Managed Installa1on Why? What are we using now? Needs Installs Updates Apple Updates

More information

Discrete Processes

Discrete Processes FRTN20 Market-Driven Systems Marknadsstyrda System FRTN20 Lecture 2: Discrete Produc@on 1 Discrete Produc@on Processes General Characteris@cs of discrete produc@on processes: Discon@nuous produc@on of

More information

Architecture of so-ware systems

Architecture of so-ware systems Architecture of so-ware systems Lecture 13: Class/object ini

More information

Founda'ons of So,ware Engineering. Sta$c analysis (1/2) Claire Le Goues

Founda'ons of So,ware Engineering. Sta$c analysis (1/2) Claire Le Goues Founda'ons of So,ware Engineering Sta$c analysis (1/2) Claire Le Goues 1 Two fundamental concepts Abstrac'on. Elide details of a specific implementa$on. Capture seman$cally relevant details; ignore the

More information

Finding Security Bugs in Web Applications using a Catalog of Access Control Patterns

Finding Security Bugs in Web Applications using a Catalog of Access Control Patterns Finding Security Bugs in Web Applications using a Catalog of Access Control Patterns The MIT Faculty has made this article openly available. Please share how this access benefits you. Your story matters.

More information

Automa'c Test Genera'on

Automa'c Test Genera'on Automa'c Test Genera'on First, about Purify Paper about Purify (and PurifyPlus) posted How do you monitor reads and writes: insert statements before and a?er reads, writes in code can s'll be done with

More information

Upload to your web space (e.g., UCSC) Due this Thursday 4/8 in class Deliverable: Send me an with the URL Grading:

Upload to your web space (e.g., UCSC) Due this Thursday 4/8 in class Deliverable: Send me an  with the URL Grading: CS 183 4/6/2010 Build a simple HTML page, topic of your choice Will use this as a basis and gradually and add more features as the class progresses Need to be done with your favorite text editor, no visual

More information

Database design and implementation CMPSCI 645. Lecture 06: Constraints and E/R model

Database design and implementation CMPSCI 645. Lecture 06: Constraints and E/R model Database design and implementation CMPSCI 645 Lecture 06: Constraints and E/R model Constraints } Constraint: a property that we want our data to sa2sfy } Enforce by taking ac2ons: } Forbid an update }

More information

Writing a Fraction Class

Writing a Fraction Class Writing a Fraction Class So far we have worked with floa0ng-point numbers but computers store binary values, so not all real numbers can be represented precisely In applica0ons where the precision of real

More information

Founda'ons of So,ware Engineering. Lecture 11 Intro to QA, Tes2ng Claire Le Goues

Founda'ons of So,ware Engineering. Lecture 11 Intro to QA, Tes2ng Claire Le Goues Founda'ons of So,ware Engineering Lecture 11 Intro to QA, Tes2ng Claire Le Goues 1 Learning goals Define so;ware analysis. Reason about QA ac2vi2es with respect to coverage and coverage/adequacy criteria,

More information

Static Analysis! Summary of Dynamic Testing! Some References for Testing! Prof. Leon J. Osterweil! CS 520/620! Spring 2013! DEVELOPMENT PHASES!

Static Analysis! Summary of Dynamic Testing! Some References for Testing! Prof. Leon J. Osterweil! CS 520/620! Spring 2013! DEVELOPMENT PHASES! Requirements Spec. Design Static Analysis Prof. Leon J. Osterweil CS 50/60 Spring 0 Characteristics of System to be built must match required characteristics Test Results must match required behavior Hi

More information

Incremental Proof Development in Dafny

Incremental Proof Development in Dafny 15-414 Lecture 17 1 Instructor: Matt Fredrikson Incremental Proof Development in Dafny TA: Ryan Wagner In this discussion, we ll see in more detail how to go about proving the total correctness of imperative

More information

10/7/15. MediaItem tostring Method. Objec,ves. Using booleans in if statements. Review. Javadoc Guidelines

10/7/15. MediaItem tostring Method. Objec,ves. Using booleans in if statements. Review. Javadoc Guidelines Objec,ves Excep,ons Ø Wrap up Files Streams MediaItem tostring Method public String tostring() { String classname = getclass().tostring(); StringBuilder rep = new StringBuilder(classname); return rep.tostring();

More information

What were his cri+cisms? Classical Methodologies:

What were his cri+cisms? Classical Methodologies: 1 2 Classifica+on In this scheme there are several methodologies, such as Process- oriented, Blended, Object Oriented, Rapid development, People oriented and Organisa+onal oriented. According to David

More information

Approach starts with GEN and KILL sets

Approach starts with GEN and KILL sets b -Advanced-DFA Review of Data Flow Analysis State Propaga+on Computer Science 5-6 Fall Prof. L. J. Osterweil Material adapted from slides originally prepared by Prof. L. A. Clarke A technique for determining

More information

Static Analysis! Prof. Leon J. Osterweil! CS 520/620! Spring 2013! Characteristics of! System to be! built must! match required! characteristics!

Static Analysis! Prof. Leon J. Osterweil! CS 520/620! Spring 2013! Characteristics of! System to be! built must! match required! characteristics! Static Analysis! Prof. Leon J. Osterweil! CS 50/60! Spring 01! Requirements Spec.! Design! Test Results must! match required behavior! Characteristics of! System to be! built must! match required! characteristics!

More information

Intelligent Systems Knowledge Representa6on

Intelligent Systems Knowledge Representa6on Intelligent Systems Knowledge Representa6on SCJ3553 Ar6ficial Intelligence Faculty of Computer Science and Informa6on Systems Universi6 Teknologi Malaysia Outline Introduc6on Seman6c Network Frame Conceptual

More information

Encapsula)on, cont d. Polymorphism, Inheritance part 1. COMP 401, Spring 2015 Lecture 7 1/29/2015

Encapsula)on, cont d. Polymorphism, Inheritance part 1. COMP 401, Spring 2015 Lecture 7 1/29/2015 Encapsula)on, cont d. Polymorphism, Inheritance part 1 COMP 401, Spring 2015 Lecture 7 1/29/2015 Encapsula)on In Prac)ce Part 2: Separate Exposed Behavior Define an interface for all exposed behavior In

More information

Lecture Notes on Real-world SMT

Lecture Notes on Real-world SMT 15-414: Bug Catching: Automated Program Verification Lecture Notes on Real-world SMT Matt Fredrikson Ruben Martins Carnegie Mellon University Lecture 15 1 Introduction In the previous lecture we studied

More information

Runtime Checking and Test Case Generation for Python

Runtime Checking and Test Case Generation for Python Runtime Checking and Test Case Generation for Python Anna Durrer Master Thesis Chair of Programming Methodology D-INFK ETH Supervisor: Marco Eilers, Prof. Peter Müller 24. Mai 2017 1 Introduction This

More information

Another Simple Program: Adding Two Integers

Another Simple Program: Adding Two Integers Another Simple Program: Adding Two Integers Another Simple Program: Adding Two Integers This program uses the input stream object std::cin and the stream extrac>, to obtain two integers

More information

Ways to implement a language

Ways to implement a language Interpreters Implemen+ng PLs Most of the course is learning fundamental concepts for using PLs Syntax vs. seman+cs vs. idioms Powerful constructs like closures, first- class objects, iterators (streams),

More information

Instructor: Randy H. Katz hap://inst.eecs.berkeley.edu/~cs61c/fa13. Fall Lecture #7. Warehouse Scale Computer

Instructor: Randy H. Katz hap://inst.eecs.berkeley.edu/~cs61c/fa13. Fall Lecture #7. Warehouse Scale Computer CS 61C: Great Ideas in Computer Architecture Everything is a Number Instructor: Randy H. Katz hap://inst.eecs.berkeley.edu/~cs61c/fa13 9/19/13 Fall 2013 - - Lecture #7 1 New- School Machine Structures

More information

Stream and Complex Event Processing Discovering Exis7ng Systems: esper

Stream and Complex Event Processing Discovering Exis7ng Systems: esper Stream and Complex Event Processing Discovering Exis7ng Systems: esper G. Cugola E. Della Valle A. Margara Politecnico di Milano gianpaolo.cugola@polimi.it emanuele.dellavalle@polimi.it Univ. della Svizzera

More information

Active Record Associations

Active Record Associations Active Record Associations January 13, 2015 This guide covers the association features of Active Record. After reading this guide, you will know: How to declare associations between Active Record models.

More information

Condi(onals and Loops

Condi(onals and Loops Condi(onals and Loops 1 Review Primi(ve Data Types & Variables int, long float, double boolean char String Mathema(cal operators: + - * / % Comparison: < > = == 2 A Founda(on for Programming any program

More information

CISC327 - So*ware Quality Assurance. Lecture 13 Black Box Unit

CISC327 - So*ware Quality Assurance. Lecture 13 Black Box Unit CISC327 - So*ware Quality Assurance Lecture 13 Black Box Unit Tes@ng Black Box Unit Tes@ng Black box method tes@ng Test harnesses Role of code- level specifica@ons (asser@ons) Automa@ng black box unit

More information

Integration of SMT Solvers with ITPs There and Back Again

Integration of SMT Solvers with ITPs There and Back Again Integration of SMT Solvers with ITPs There and Back Again Sascha Böhme and University of Sheffield 7 May 2010 1 2 Features: SMT-LIB vs. Yices Translation Techniques Caveats 3 4 Motivation Motivation System

More information

Sta$c Analysis Dataflow Analysis

Sta$c Analysis Dataflow Analysis Sta$c Analysis Dataflow Analysis Roadmap Overview. Four Analysis Examples. Analysis Framework Soot. Theore>cal Abstrac>on of Dataflow Analysis. Inter- procedure Analysis. Taint Analysis. Overview Sta>c

More information

Architecture, Design (and a little Verification) for BX

Architecture, Design (and a little Verification) for BX 1 Architecture, Design (and a little Verification) for BX Richard Paige Dept of Computer Science, University of York @richpaige 2 Contents 3 What is architecture and design for transformations and BX?

More information

NAMES, SCOPES AND BINDING A REVIEW OF THE CONCEPTS

NAMES, SCOPES AND BINDING A REVIEW OF THE CONCEPTS NAMES, SCOPES AND BINDING A REVIEW OF THE CONCEPTS Name Binding and Binding Time Name binding is the associa1on of objects (data and/or code) with names (iden1fiers) Shape S = new Shape(); The binding

More information

22c:181 / 55:181 Formal Methods in So8ware Engineering

22c:181 / 55:181 Formal Methods in So8ware Engineering 22c:181 / 55:181 Formal Methods in So8ware Engineering Introduc>on to Alloy Copyright 2001-13, Matt Dwyer, John Hatcliff, Rod Howell, Laurence Pilard, and Cesare Tinelli. Created by Cesare Tinelli and

More information

more uml: sequence & use case diagrams

more uml: sequence & use case diagrams more uml: sequence & use case diagrams uses of uml as a sketch: very selec)ve informal and dynamic forward engineering: describe some concept you need to implement reverse engineering: explain how some

More information

Fix- point engine in Z3. Krystof Hoder Nikolaj Bjorner Leonardo de Moura

Fix- point engine in Z3. Krystof Hoder Nikolaj Bjorner Leonardo de Moura μz Fix- point engine in Z3 Krystof Hoder Nikolaj Bjorner Leonardo de Moura Mo?va?on Horn EPR applica?ons (Datalog) Points- to analysis Security analysis Deduc?ve data- bases and knowledge bases (Yago)

More information

CSE Opera,ng System Principles

CSE Opera,ng System Principles CSE 30341 Opera,ng System Principles Lecture 5 Processes / Threads Recap Processes What is a process? What is in a process control bloc? Contrast stac, heap, data, text. What are process states? Which

More information

Automated Generation of Adaptive Test Plans for Self- Adaptive Systems. Erik Fredericks and Be'y H. C. Cheng May 19 th, 2015

Automated Generation of Adaptive Test Plans for Self- Adaptive Systems. Erik Fredericks and Be'y H. C. Cheng May 19 th, 2015 Automated Generation of Adaptive Test Plans for Self- Adaptive Systems Erik Fredericks and Be'y H. C. Cheng May 19 th, 2015 Motivation Run- 9me tes9ng provides assurance for self- adap9ve systems (SAS)

More information

RaceMob: Crowdsourced Data Race Detec,on

RaceMob: Crowdsourced Data Race Detec,on RaceMob: Crowdsourced Data Race Detec,on Baris Kasikci, Cris,an Zamfir, and George Candea School of Computer & Communica3on Sciences Data Races to shared memory loca,on By mul3ple threads At least one

More information

Garbage collec,on Parameter passing in Java. Sept 21, 2016 Sprenkle - CSCI Assignment 2 Review. public Assign2(int par) { onevar = par; }

Garbage collec,on Parameter passing in Java. Sept 21, 2016 Sprenkle - CSCI Assignment 2 Review. public Assign2(int par) { onevar = par; } Objec,ves Inheritance Ø Overriding methods Garbage collec,on Parameter passing in Java Sept 21, 2016 Sprenkle - CSCI209 1 Assignment 2 Review private int onevar; public Assign2(int par) { onevar = par;

More information

CSE 135. Main Problem: Multiple languages and multiple computation servers

CSE 135. Main Problem: Multiple languages and multiple computation servers CSE 15 Rapid Application Development: Object-Relational Mapping & a lesson on the whys and why nots Main Problem: Multiple languages and multiple computation servers Two different computation servers with

More information

Reusability of So/ware- Defined Networking Applica=ons: A Run=me, Mul=- Controller Approach

Reusability of So/ware- Defined Networking Applica=ons: A Run=me, Mul=- Controller Approach Reusability of So/ware- Defined Networking Applica=ons: A Run=me, Mul=- Controller Approach Roberto Doriguzzi Corin (CREATE- NET), Pedro A. Aranda Gu=érrez (Telefonica), Elisa Rojas (Telcaria), Holger

More information

Research opportuni/es with me

Research opportuni/es with me Research opportuni/es with me Independent study for credit - Build PL tools (parsers, editors) e.g., JDial - Build educa/on tools (e.g., Automata Tutor) - Automata theory problems e.g., AutomatArk - Research

More information

Predicate Refinement Heuristics in Program Verification with CEGAR

Predicate Refinement Heuristics in Program Verification with CEGAR Predicate Refinement Heuristics in Program Verification with CEGAR Tachio Terauchi (JAIST) Part of this is joint work with Hiroshi Unno (U. Tsukuba) 1 Predicate Abstraction with CEGAR Iteratively generate

More information

Analysis and Tes,ng of PLEXIL Plans

Analysis and Tes,ng of PLEXIL Plans Analysis and Tes,ng of PLEXIL Plans Jason Biatek, Michael W. Whalen, Sanjai Rayadurgam, Mats P.E. Heimdahl, Michael Lowry 04-06- 14 FormaliSE - Mike Whalen 1 Autonomy at NASA 04-06- 14 FormaliSE - Mike

More information

Alterna(ve Architectures

Alterna(ve Architectures Alterna(ve Architectures COMS W4118 Prof. Kaustubh R. Joshi krj@cs.columbia.edu hep://www.cs.columbia.edu/~krj/os References: Opera(ng Systems Concepts (9e), Linux Kernel Development, previous W4118s Copyright

More information

Rails: Associations and Validation

Rails: Associations and Validation Rails: Associations and Validation Computer Science and Engineering College of Engineering The Ohio State University Lecture 26 Schemas, Migrations, Models migrations models database.yml db:migrate db:create

More information

FPGAs as Streaming MIMD Machines for Data Analy9cs. James Thomas, Matei Zaharia, Pat Hanrahan

FPGAs as Streaming MIMD Machines for Data Analy9cs. James Thomas, Matei Zaharia, Pat Hanrahan FPGAs as Streaming MIMD Machines for Data Analy9cs James Thomas, Matei Zaharia, Pat Hanrahan CPU/GPU Control Flow Divergence For peak performance, CPUs and GPUs require groups of threads to have iden9cal

More information

From Z3 to Lean, Efficient Verification

From Z3 to Lean, Efficient Verification From Z3 to Lean, Efficient Verification Turing Gateway to Mathematics, 19 July 2017 Leonardo de Moura, Microsoft Research Joint work with Nikolaj Bjorner and Christoph Wintersteiger Satisfiability Solution/Model

More information

Transac.on Management. Transac.ons. CISC437/637, Lecture #16 Ben Cartere?e

Transac.on Management. Transac.ons. CISC437/637, Lecture #16 Ben Cartere?e Transac.on Management CISC437/637, Lecture #16 Ben Cartere?e Copyright Ben Cartere?e 1 Transac.ons A transac'on is a unit of program execu.on that accesses and possibly updates rela.ons The DBMS s view

More information

Model-Based Testing. (DIT848 / DAT261) Spring Lecture 3 White Box Testing - Coverage

Model-Based Testing. (DIT848 / DAT261) Spring Lecture 3 White Box Testing - Coverage Model-Based Testing (DIT848 / DAT261) Spring 2017 Lecture 3 White Box Testing - Coverage Gerardo Schneider Dept. of Computer Science and Engineering Chalmers University of Gothenburg Some slides based

More information

Josh Bloch Charlie Garrod Darya Melicher

Josh Bloch Charlie Garrod Darya Melicher Principles of So3ware Construc9on: Objects, Design, and Concurrency Part 1: Introduc9on Course overview and introduc9on to so3ware design Josh Bloch Charlie Garrod Darya Melicher 1 So3ware is everywhere

More information

COSC 111: Computer Programming I. Dr. Bowen Hui University of Bri>sh Columbia Okanagan

COSC 111: Computer Programming I. Dr. Bowen Hui University of Bri>sh Columbia Okanagan COSC 111: Computer Programming I Dr. Bowen Hui University of Bri>sh Columbia Okanagan 1 First half of course SoEware examples From English to Java Template for building small programs Exposure to Java

More information

Abstract Interpretation

Abstract Interpretation Abstract Interpretation Ranjit Jhala, UC San Diego April 22, 2013 Fundamental Challenge of Program Analysis How to infer (loop) invariants? Fundamental Challenge of Program Analysis Key issue for any analysis

More information

A Model-Driven Approach to Situations: Situation Modeling and Rule-Based Situation Detection

A Model-Driven Approach to Situations: Situation Modeling and Rule-Based Situation Detection A Model-Driven Approach to Situations: Situation Modeling and Rule-Based Situation Detection Patrícia Dockhorn Costa Izon Thomas Mielke Isaac Pereira João Paulo A. Almeida jpalmeida@ieee.org http://nemo.inf.ufes.br

More information

L6: System design: behavior models

L6: System design: behavior models L6: System design: behavior models Limita6ons of func6onal decomposi6on Behavior models State diagrams Flow charts Data flow diagrams En6ty rela6onship diagrams Unified Modeling Language Capstone design

More information

Making applica+ons with Java. Text Technologies 2013 Chris Culy

Making applica+ons with Java. Text Technologies 2013 Chris Culy Making applica+ons with Java Desktop applica+on aka executable jar file Commandline: java jar myapplica+on.jar Or, if you have a GUI interface, doubleclick on the jar file Easiest solu+on: Let the IDE

More information

Modules and Representa/on Invariants

Modules and Representa/on Invariants Modules and Representa/on Invariants COS 326 David Walker Princeton University slides copyright 2017 David Walker permission granted to reuse these slides for non-commercial educa/onal purposes LAST TIME

More information

Jinn: Synthesizing Dynamic Bug Detectors for Foreign Language Interfaces

Jinn: Synthesizing Dynamic Bug Detectors for Foreign Language Interfaces Jinn: Synthesizing Dynamic Bug Detectors for Foreign Language Interfaces Byeongcheol Lee Ben Wiedermann Mar>n Hirzel Robert Grimm Kathryn S. McKinley B. Lee, B. Wiedermann, M. Hirzel, R. Grimm, and K.

More information

Architectural Requirements Phase. See Sommerville Chapters 11, 12, 13, 14, 18.2

Architectural Requirements Phase. See Sommerville Chapters 11, 12, 13, 14, 18.2 Architectural Requirements Phase See Sommerville Chapters 11, 12, 13, 14, 18.2 1 Architectural Requirements Phase So7ware requirements concerned construc>on of a logical model Architectural requirements

More information

PLDI 2016 Tutorial Automata-Based String Analysis

PLDI 2016 Tutorial Automata-Based String Analysis PLDI 2016 Tutorial Automata-Based String Analysis Tevfik Bultan, Abdulbaki Aydin, Lucas Bang Verification Laboratory http://vlab.cs.ucsb.edu Department of Computer Science Common Usages of Strings } Input

More information

Sec$on 2: Specifica)on, ADTs, RI WITH MATERIAL FROM MANY

Sec$on 2: Specifica)on, ADTs, RI WITH MATERIAL FROM MANY Sec$on 2: Specifica)on, ADTs, RI WITH MATERIAL FROM MANY Agenda Announcements HW1: due today at 23:59 pm Don t forget to commit/push your changes THIS INCLUDES TAGGING YOUR FINAL VERSION Abstract data

More information