Higher-order Abstract Syntax with constraints or Testing concurrent systems or 25 Years of Logic Programming Languages Radha Jagadeesan, De Paul U Gopalan.

Slides:



Advertisements
Similar presentations
1 Verification by Model Checking. 2 Part 1 : Motivation.
Advertisements

Technologies for finding errors in object-oriented software K. Rustan M. Leino Microsoft Research, Redmond, WA Lecture 1 Summer school on Formal Models.
Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Safe Open-Nested Transactions Jim Sukha MIT CSAIL Supercomputing Technologies Group Kunal Agrawal, I-Ting Angelina Lee, Bradley C. Kuszmaul, Charles E.
Service Oriented Architecture Reference Model
Determinate Imperative Programming: The CF Model Vijay Saraswat IBM TJ Watson Research Center joint work with Radha Jagadeesan, Armando Solar- Lezama,
Language Specification using Metamodelling Joachim Fischer Humboldt University Berlin LAB Workshop Geneva
A Formal Descriptive Semantics of UML Lijun Shan Dept of Computer Science National University of Defense Technology, Changsha, China Hong Zhu Department.
1 Verification of Parameterized Systems Reducing Model Checking of the Few to the One. E. Allen Emerson, Richard J. Trefler and Thomas Wahl Junaid Surve.
IBM Research: Software Technology © 2006 IBM Corporation 1 Programming Language X10 Christoph von Praun IBM Research HPC WPL Sandia National Labs December.
X10 Tutorial PSC Software Productivity Study May 23 – 27, 2005 Vivek Sarkar IBM T.J. Watson Research Center This work has been supported.
Reliable Scripting Using Push Logic Push Logic David Greaves, Daniel Gordon University of Cambridge Computer Laboratory Reliable Scripting.
Database System Concepts and Architecture
1 Logic Programming School of Informatics, University of Edinburgh Logic Programming in 50 Minutes The purpose of this lecture is to explain why logic.
1 Practical Pluggable types for Java Chris Andreae James Noble Victoria University of Wellington Shane Arkus Todd Millstein University of California Presented.
Reliable and Efficient Programming Abstractions for Sensor Networks Nupur Kothari, Ramki Gummadi (USC), Todd Millstein (UCLA) and Ramesh Govindan (USC)
Semantics Static semantics Dynamic semantics attribute grammars
Greta YorshEran YahavMartin Vechev IBM Research. { ……………… …… …………………. ……………………. ………………………… } P1() Challenge: Correct and Efficient Synchronization { ……………………………
Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
Compilation 2011 Static Analysis Johnni Winther Michael I. Schwartzbach Aarhus University.
Abstraction and Modular Reasoning for the Verification of Software Corina Pasareanu NASA Ames Research Center.
Budapest University of Technology and EconomicsDagstuhl 2004 Department of Measurement and Information Systems 1 Towards Automated Formal Verification.
IBM’s X10 Presentation by Isaac Dooley CS498LVK Spring 2006.
Giving a formal meaning to “Specialization” In these note we try to give a formal meaning to specifications, implementations, their comparisons. We define.
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 11.
1 Eran Yahav Technion Joint work with Martin Vechev (ETH), Greta Yorsh (ARM), Michael Kuperstein (Technion), Veselin Raychev (ETH)
A survey of techniques for precise program slicing Komondoor V. Raghavan Indian Institute of Science, Bangalore.
Formal Methods of Systems Specification Logical Specification of Hard- and Software Prof. Dr. Holger Schlingloff Institut für Informatik der.
PTIDES: Programming Temporally Integrated Distributed Embedded Systems Yang Zhao, EECS, UC Berkeley Edward A. Lee, EECS, UC Berkeley Jie Liu, Microsoft.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
CS 330 Programming Languages 09 / 18 / 2007 Instructor: Michael Eckmann.
UML CASE Tool. ABSTRACT Domain analysis enables identifying families of applications and capturing their terminology in order to assist and guide system.
Programming Languages Structure
HAS. Patterns The use of patterns is essentially the reuse of well established good ideas. A pattern is a named well understood good solution to a common.
1 Ivan Lanese Computer Science Department University of Bologna Italy Concurrent and located synchronizations in π-calculus.
Assessing the Suitability of UML for Modeling Software Architectures Nenad Medvidovic Computer Science Department University of Southern California Los.
TCC, With History RADHA JAGADEESAN (WITH VINEET GUPTA AND VIJAY SARASWAT)
Formalizing the Asynchronous Evolution of Architecture Patterns Workshop on Self-Organizing Software Architectures (SOAR’09) September 14 th 2009 – Cambrige.
1 Introduction Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
The Generic Gaming Engine Andrew Burke Advisor: Prof. Aaron Cass Abstract Games have long been a source of fascination. Their inherent complexity has challenged.
Chapter 6 Programming Languages. © 2005 Pearson Addison-Wesley. All rights reserved 6-2 Chapter 6: Programming Languages 6.1 Historical Perspective 6.2.
Component frameworks Roy Kensmil. Historical trens in software development. ABSTRACT INTERACTIONS COMPONENT BUS COMPONENT GLUE THIRD-PARTY BINDING.
Chapter 6 Programming Languages © 2007 Pearson Addison-Wesley. All rights reserved.
Formal Verification Lecture 9. Formal Verification Formal verification relies on Descriptions of the properties or requirements Descriptions of systems.
ABSTRACT The real world is concurrent. Several things may happen at the same time. Computer systems must increasingly contend with concurrent applications.
Checking Reachability using Matching Logic Grigore Rosu and Andrei Stefanescu University of Illinois, USA.
1 5 Nov 2002 Risto Pohjonen, Juha-Pekka Tolvanen MetaCase Consulting AUTOMATED PRODUCTION OF FAMILY MEMBERS: LESSONS LEARNED.
A Logic Meta-Programming Approach to support the Co-Evolution of Object-Oriented Design and Implementation Roel Wuyts , PROG.
Theory of Programming Languages Introduction. What is a Programming Language? John von Neumann (1940’s) –Stored program concept –CPU actions determined.
LDK R Logics for Data and Knowledge Representation Propositional Logic: Reasoning First version by Alessandro Agostini and Fausto Giunchiglia Second version.
Lecture 5 1 CSP tools for verification of Sec Prot Overview of the lecture The Casper interface Refinement checking and FDR Model checking Theorem proving.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
© Drexel University Software Engineering Research Group (SERG) 1 The OASIS SOA Reference Model Brian Mitchell.
What’s Ahead for Embedded Software? (Wed) Gilsoo Kim
Design-Directed Programming Martin Rinard Daniel Jackson MIT Laboratory for Computer Science.
A Mechanized Model of the Theory of Objects 1.Functional  -calculus in Isabelle 2.Confluence Proof in Isabelle 3.Ongoing Work, Applications, Conclusion.
Overview of Previous Lesson(s) Over View 3 Model of a Compiler Front End.
A Pattern Language for Parallel Programming Beverly Sanders University of Florida.
Presented by: Belgi Amir Seminar in Distributed Algorithms Designing correct concurrent algorithms Spring 2013.
Parallel Computing Presented by Justin Reschke
IBM Research: Software Technology © 2005 IBM Corporation Programming Technologies 1 Temporal Rules Vijay Saraswat IBM TJ Watson July 27, 2012.
ALLOY: A Formal Methods Tool Glenn Gordon Indiana University of Pennsylvania COSC 481- Formal Methods Dr. W. Oblitey 26 April 2005.
COMP 412, FALL Type Systems C OMP 412 Rice University Houston, Texas Fall 2000 Copyright 2000, Robert Cartwright, all rights reserved. Students.
Model Checking Early Requirements Specifications in Tropos Presented by Chin-Yi Tsai.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Parsing & Context-Free Grammars
X10: Performance and Productivity at Scale
Discussion with Gregor Kiczales at UBC
IS 2935: Developing Secure Systems
강의 내용 및 방법 접근방법 리포트 시험 Lambda Calculus, Proof of Correctness
Presentation transcript:

Higher-order Abstract Syntax with constraints or Testing concurrent systems or 25 Years of Logic Programming Languages Radha Jagadeesan, De Paul U Gopalan Nadathur, U of Minnesota Vijay Saraswat, IBM TJ Watson This work has been supported in part by DARPA under contract No. NBCH , NSF under contracts and CCR

2 Acknowledgements X10 design -- X10 core team Philippe Charles, Chris Donawa, Kemal Ebcioglu, Christian Grothoff, Allan Kielstra, Douglas Lovell, Maged Michael, Christoph von Praun, Vivek Sarkar, Armando Solar-Lezama X10 Type System Christian Grothoff, Jens Palsberg. X10DT (Eclipse) Robert Fuhrer, Mandana Vaziri Open Compiler Martin Odersky, Todd Millstein, Lex Spoon Scala implementation of RCC Lex Spoon, Martin Odersky

3 The context The Challenge of High Performance and High Productivity Computing. Scalability. 100K hardware threads, sustain 10^15 operations/second. High Productivity. Today, MPI, OpenMP. Low-level APIs oriented towards the hardcore implementer.

4 The X10 concept Our Approach Design a clean, scalable, concurrent, imperative Java-based language. Reify distribution, emphasize asynchrony. Preserve determinacy, deadlock-freedom (where possible) Focus on concurrency, synchronization, distribution, arrays. Few things, done well.

5 Our results OOPSLA 05 Onwards! Language Report X10 Reference Implementation Applications Productivity Study (Submitted)

6 Meta-programming Background: Design and prototyping of new programming languages. Specifying type checkers Specifying application specific refactorings. Specifying compiler analyses Specifying operational semantics of progg lang Desiderata. Able to represent O- programs as F-data Use Higher-order Abstract Syntax? Constraint-based Constraints are central to program analysis. Constraints should be absorbed, not reified. Declarative View F-programs as logical formulas.

7 (Some) Logic Programming Languages Kowalski, Colmerauer,… Jaffar, Lassez, Maher Miller, Nadathur Clark, Shapiro, Ueda Maher, Saraswat Saraswat, Lincoln Leach, Nieva, Rodriguez- Artalejo

8 Why LHS recursion? Conjunction on the Left =/= Conjunction on the Right. All constraints imposed by LHS are simultaneously available. Constraints asserted by RHS (c => G) available only for the current goal (G). Recursions that accumulate constraints in the store must be performed on LHS. Example: Java type-checking Source file must be traversed to obtain signatures of referenced classes. Class methods are type-checked in this context. LHS recursion, not RHS recursion, must be used to compute signatures. Example: Operational semantics of X10. typedClass ClassName :- parse ClassName Code, typesOfrefedClasses Code => typedCode Code.

9 Testing interpretation Assume underlying constraint system C. D and G communicate only through constraints (Disjoint Vocabulary Condition), not through atoms. Left recursion segregated from right recursion. Use of q is restricted to ensure that it respects polarity (only Ds on the left, only Gs on the right). Yet D, G interaction is recursive: G::= D q G and deep guards D::=G q D Logically, rules of IL are augmented with (CONST): L,c 0,…, c n d c if c 0,…, c n d C c View D ?- G as a behavioral test G of a concurrently evolving system D. D ?- G = Does D have the potential to answer (some recursive simplification of) G? i.e. Can execution of D generate constraints c 0,…, c n st c 0,…, c n d C c, where c is produced by recursively simplifying G? LHS recursion = mechanism for realizing the potential. D processes are determinate, potential is not lost on evolution, only realized (May=Must). (Could add D ::= D or D.) D ::= true | c | E | D and D | G q A | E q D | G q D | Ex.D | Ax.D G ::= true | c | A | G and G | D q G | G or G | Ex.G | Ax.G disjoint Uniform proofs deal only with computation on the right.

10 Operational Semantics of RCC L ?-true e L ?-c e (if L d c) L,G q A?-A L,G q A?-G L ?G and G L ?G, L ?G L ?-G or G L ?-G L ?-D q G L,D?-G L ?-Ex.G L ?-G[t/X] L ?-Ax.G L ?-G[i/X] * *: i must be new L,E,E q D?-G L,E,D?-G L,D and D?-G L,D,D?-G L,Ex.D?-G L, D[i/x]?-G * L,Ax.D?-G L, Ax.D,D[t/x]?- G L,G q D ?- G L, D ?- G if L,G q D ?- G * e G,L?-G G, G (if L?-G G) Semantics models successful termination, non-deterministically. Configurations: Multisets G of predications L?-G. (L ranges over multisets of Ds.) Successful termination: G * e D ::= true | c | E | D and D | G q A | G q A | G q A | Ex.D | Ax.D G ::= true | c | A | G and G | D q G | G or G | Ex.G | Ax.G

11 Basic Results: Operational proofs Operational proofs must satisfy chaining conditions. BC condition: Every instance of (qL) in which the principal formula is G q A must have a conclusion L,G q A d A FC condition: Similar. Constraint condition: Every instance of (qL) in which the principal formula is c q D must use (CONST). The operational semantics produces only operational proofs. D?-G e iff D d 0 G Completeness Theorem: D d G iff D d 0 G Chaining conditions capture restricted use of L q in RCC

12 Implementation An rcc implementation embedded in Scala is being designed. Absorbs predicate definition (e.g. jcc), uses Scala type system. Conceptual issues Controlling non- determinism (backtracking). Use known permutability properties of IL. Solving constrained unification problems under a mixed prefix: W: c 0,…, c n c Joint work with Martin Odersky and Lex Spoon.

13 Conclusion Rich logical framework for meta- programming. Provides a computational interpretation for a large fragment of IL. Implementation being developed on top of Scala Intended to be used in open compilers, to prototype new programming languages.