Specifications and Morphisms Spec Partial-Order sort E op _le_: E, E  Boolean axiom reflexive x le x axiom transitive x le y  y le z  x le z axiom antisymmetric.

Slides:



Advertisements
Similar presentations
Compilers Course 379K, TTH 9:30-11:00 Instructor: Dr. Doron A. Peled Office Hours: Mon 11:00-12:00.
Advertisements

Data-Flow Analysis II CS 671 March 13, CS 671 – Spring Data-Flow Analysis Gather conservative, approximate information about what a program.
Lecture 11: Code Optimization CS 540 George Mason University.
Grammar vs Recursive Descent Parser
Translator Architecture Code Generator ParserTokenizer string of characters (source code) string of tokens abstract program string of integers (object.
Exercise 1: Balanced Parentheses Show that the following balanced parentheses grammar is ambiguous (by finding two parse trees for some input sequence)
Predicate Complete Testing * Thomas Ball * Thomas Ball, A Theory of Predicate-Complete Test Coverage and Generation, Technical Report MSR-TR ,
Background information Formal verification methods based on theorem proving techniques and model­checking –to prove the absence of errors (in the formal.
Forges: Synthesizing Verified Generators Kestrel Institute PIs: Cordell Green, John Anton CSs: Lindsay Errington, Doug Smith, Alessandro Coglio, Stephen.
Lecture # 02 07/02/2013Dr. Muhammad Umair 1. 07/02/2013Dr. Muhammad Umair 2  Numeric  Integer Numbers  0,10,15,4563 etc.  Fractional Number  10.5,
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
Coproduct Transformations on Lattices of Closed Partial Orders Gemma Casas-Garriga MOISES meeting MOISES meeting, Valladolid, Sept 2004.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Lecture 17: Topological Sort Algorithm.
Programming Language Semantics Denotational Semantics Chapter 5 Part II.
Cse321, Programming Languages and Compilers 1 6/19/2015 Lecture #18, March 14, 2007 Syntax directed translations, Meanings of programs, Rules for writing.
Hierarchical Reinforcement Learning Ersin Basaran 19/03/2005.
Abstract Interpretation Part I Mooly Sagiv Textbook: Chapter 4.
CSC321: Programming Languages14-1 Programming Languages Tucker and Noonan Chapter 14: Functional Programming 14.1 Functions and the Lambda Calculus 14.2.
Basic Definitions Data Structures: Data Structures: A data structure is a systematic way of organizing and accessing data. Or, It’s the logical relationship.
Generative Programming. Generic vs Generative Generic Programming focuses on representing families of domain concepts Generic Programming focuses on representing.
1 Tentative Schedule u Today: Theory of abstract interpretation u May 5 Procedures u May 15, Orna Grumberg u May 12 Yom Hatzamaut u May.
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 4: SMT-based Bounded Model Checking of Concurrent Software.
Programming Concepts Jacques Tiberghien office : Mobile :
Solving fixpoint equations
Models of Computation: FSM Model Reading: L. Lavagno, A.S. Vincentelli and E. Sentovich, “Models of computation for Embedded System Design”
1 Program Correctness CIS 375 Bruce R. Maxim UM-Dearborn.
Kestrel Tools for Producing Reliable Software: Synthesis and Analysis Kestrel Institute Palo Alto, California Douglas R. Smith.
UML Formalization: A Position Paper Kenneth BaclawskiNortheastern University Scott DeLoachAFIT Mieczyslaw KokarNortheastern University Jeffrey SmithNortheastern.
Constraint Satisfaction Problems (CSPs) CPSC 322 – CSP 1 Poole & Mackworth textbook: Sections § Lecturer: Alan Mackworth September 28, 2012.
Design engineering Vilnius The goal of design engineering is to produce a model that exhibits: firmness – a program should not have bugs that inhibit.
Generative Programming. Automated Assembly Lines.
RRXS Redundancy reducing XML storage in relations O. MERT ERKUŞ A. ONUR DOĞUÇ
1 Introduction to Software Engineering Lecture 1.
Predicate Abstraction of ANSI-C Programs Using SAT By Edmund Clarke, Daniel Kroening, Natalia Sharygina, Karen Yorav Presented by Yunho Kim Provable Software.
FIRST QUESTIONS FOR ALGORITHM ANALYSIS. WHAT IS AN ALGORITHM? From the text (p. 3): “An algorithm is a sequence of unambiguous instructions for solving.
Kestrel Policy Enforcement and Refinement Douglas R. Smith Kestrel Institute Palo Alto, California.
Software Synthesis with ACL2 Eric Smith Kestrel Institute ACL2 Workshop 2015.
Language: Set of Strings
TIVDM2Functional Programming Language Concepts 1 Concepts from Functional Programming Languages Peter Gorm Larsen.
Mathematical Preliminaries
PUBS-99-G Motivation Objective Inconsistent specification “Shell” sw only Complex, diverse and unsupported tools Complex languages/math Lack of trained.
ISP RAS Java Specification Extension for Automated Test Development Igor B. Bourdonov, Alexei V. Demakov, Andrei A. Jarov, Alexander S. Kossatchev, Victor.
Lecture 1 Overview Topics 1. Proof techniques: induction, contradiction Proof techniques June 1, 2015 CSCE 355 Foundations of Computation.
Concepts and Realization of a Diagram Editor Generator Based on Hypergraph Transformation Author: Mark Minas Presenter: Song Gu.
Formal Verification. Background Information Formal verification methods based on theorem proving techniques and model­checking –To prove the absence of.
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
Control-Theoretic Approaches for Dynamic Information Assurance George Vachtsevanos Georgia Tech Working Meeting U. C. Berkeley February 5, 2003.
CSC 243 – Java Programming, Fall, 2008 Tuesday, September 30, end of week 5, Interfaces, Derived Classes, and Abstract Classes.
Chapter 2: A Simple One Pass Compiler
Functional Programming
CSCE 355 Foundations of Computation
Names and Attributes Names are a key programming language feature
Formal Methods in software development
Introduction Algorithms Order Analysis of Algorithm
Executable Specifications: Foundations  MS Tools
PROGRAMMING IN HASKELL
PROGRAMMING IN HASKELL
CSE322 Recursive and Recursively enumerable sets
Data Modeling II XML Schema & JAXB Marc Dumontier May 4, 2004
CSCE 355 Foundations of Computation
Syntax-Directed Definition
Logical architecture refinement
Knowledge Modules in Software Synthesis
Formal Methods in software development
CASL-Common Algebraic Specification Language
PROGRAMMING IN HASKELL
Algebraic Specification Software Specification Lecture 34
OBJ first-order functional language based on equational logic
Quiz: Computational Thinking
Presentation transcript:

Specifications and Morphisms Spec Partial-Order sort E op _le_: E, E  Boolean axiom reflexive x le x axiom transitive x le y  y le z  x le z axiom antisymmetric x le y  y le x  x = y Specifications Represent Domain models Transportation, Resource, Task Software Requirements Crew Scheduling Algorithm Theories Global-Search Abstract Data Types Set(Integer) Software Architecture Scheduling-System Code Modules Network-Flow Morphisms Represent Spec StructuringTask  Scheduling  Resource Parameter Binding Time  Integer Spec Refinement Scheduling  Transportation Scheduling Algorithm Design Global-Search  Scheduling Knowledge Refinement Constraint Satisfaction  Integer Programming Datatype Refinement Set(Integer)  Bit Vector Morphism Partial-Order  Integer E   integer le    axioms   theorems A language translation that preserves provability

Taxonomy of Collection Datatypes PROTO-COLLECTION PROTO-SEQ PROTO-BAG PROTO-SET SEQ BAG LIST SEQ SET(TUPLE) SET SET-of-NAT-upto-k BIT-VECTOR ORDERED-SEQ SET-OVER-LINEAR-ORDER INDEXED-PARTITION BOUNDED-SEQ ARRAY

Planware Refinements po Transportation Scheduling 0 Resource Transportation Resource Abstract Scheduling Task Transportation Tasks TS 1 po Set(A  B  C) Indexed-Partition map(A, Set(A  B  C)) po TS2 Set-over-linear-order Ordered-Seq TS3 po TS4 po Semilattice Attribute of Task Definite Constraint

Planware Refinements po TS4 TS6 DRO Global Search with CP TS5 Global Search program TS7 Definite Constraints Constraint Propagation algorithm TS8 po Expr + Context Context-Dependent Simplification TS9 Sort + n-attributes n-tuple TS10 po

Derivation of a k-Queens Algorithm 0. Requirement Spec -- a solution is a sequence of the positions of queens in each column 1. Algorithm Design -- a global search strategy is used to enumerate queens solutions 2. Context-dependent Simplification 3. Finite Differencing -- to derive the components of ok-mask 4. Datatype Refinement -- bounded sets  bit-vectors 5. Recursion  Monadic definitions 6. Monadic  Imperative definitions -- via closure removal 7. Slicing -- to remove unnecessary ops, sorts, and axioms 8. Code Generation -- to imperative CommonLisp, C

A Simple Transformation Rule Transformation ruleExpression b=c  if empty(S) then 0 else 0 Designware Library Refinement Spec Source is import EXPR op P: Boolean op b: E op c: E def expr = if P then b else c axiom b = c Spec EXPR is sort E op expr : E Spec Target is import Source theorem expr = b

A Fusion Law spec FOLDR-FUSION is import Seq-of-A sort E op f: A  E op  : A  A  A axiom associative?(  ) op unit: A op foldr : (A  A  A)  Seq-of-A  A  A def foldr(g,as,u) =... op  : A  E  E axiom associative?(  ) op foldr : (A  E  E)  Seq-of-A  A  E def foldr(g,as,u) =... theorem foldr-fusion-law is x  f(y) = f (x  y)  f(foldr( , xs, unit)) = foldr( , xs, f(unit)) end-spec if f(x  y) = x  f(y) and  and  are associative then f(foldr( , xs, unit)) = foldr( , xs, f(unit))

A Fusion Law spec foldr-fusion is import EXPR, Seq-of-A op f: A  E op  : A  A  A op foldr : (A  A  A)  Seq-of-A  A  A op  : A  E  E axiom associativity of ,  axiom expr = f(foldr( , xs, unit)) axiom f (x  y) = x  f(y) end-spec if f(x  y) = x  f(y) and  and  are associative then f(foldr( , xs, unit)) = foldr( , xs, f(unit)) spec fold-fusion-law is import fold-fusion op foldr : (A  E  E)  Seq-of-A  A  E theorem f(foldr( , xs, unit)) = foldr( , xs, f(unit)) end-spec Spec EXPR is sort E op expr : E