Language-oriented Software Development and Rewriting Logic



Similar documents
Software Modeling and Verification

Verifying Specifications with Proof Scores in CafeOBJ

Introducing Formal Methods. Software Engineering and Formal Methods

UNDERGRADUATE DEGREE PROGRAMME IN COMPUTER SCIENCE ENGINEERING SCHOOL OF COMPUTER SCIENCE ENGINEERING, ALBACETE

DEPLOYING QoS CONTRACTS IN THE ARCHITECTURAL LEVEL

ABET General Outcomes. Student Learning Outcomes for BS in Computing

Computer Science. General Education Students must complete the requirements shown in the General Education Requirements section of this catalog.

Jairson Vitorino. PhD Thesis, CIn-UFPE February Supervisor: Prof. Jacques Robin. Ontologies Reasoning Components Agents Simulations

Masters in Artificial Intelligence

Masters in Computing and Information Technology

Professional Organization Checklist for the Computer Science Curriculum Updates. Association of Computing Machinery Computing Curricula 2008

School of Computer Science

Business-Driven Software Engineering Lecture 3 Foundations of Processes

INFORMATION TECHNOLOGY PROGRAM

Masters in Human Computer Interaction

Masters in Advanced Computer Science

Elena Baralis, Silvia Chiusano Politecnico di Torino. Pag. 1. Query optimization. DBMS Architecture. Query optimizer. Query optimizer.

Masters in Networks and Distributed Systems

CS Master Level Courses and Areas COURSE DESCRIPTIONS. CSCI 521 Real-Time Systems. CSCI 522 High Performance Computing

Software Engineering Reference Framework

Masters in Information Technology

Doctor of Philosophy in Computer Science

Verification of Imperative Programs in Theorema

The Service Revolution software engineering without programming languages

Information Systems. Administered by the Department of Mathematical and Computing Sciences within the College of Arts and Sciences.

[Refer Slide Time: 05:10]

Bachelor Degree in Informatics Engineering Master courses

Structure of Presentation. The Role of Programming in Informatics Curricula. Concepts of Informatics 2. Concepts of Informatics 1

Process Modelling from Insurance Event Log

Master of Science in Computer Science

Eastern Washington University Department of Computer Science. Questionnaire for Prospective Masters in Computer Science Students

Agreement on. Dual Degree Master Program in Computer Science KAIST. Technische Universität Berlin

How To Get A Computer Science Degree At Appalachian State

Levels of Analysis and ACT-R

Specification and Analysis of Contracts Lecture 1 Introduction

Architecture Design & Sequence Diagram. Week 7

VDM vs. Programming Language Extensions or their Integration

School of Computer Science

Erik Jonsson School of Engineering and Computer Science Interdisciplinary Programs

Automated Program Behavior Analysis

ARIZONA CTE CAREER PREPARATION STANDARDS & MEASUREMENT CRITERIA SOFTWARE DEVELOPMENT,

CS510 Software Engineering

The Software Development Process

COURSE TITLE COURSE DESCRIPTION

Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science. Unit of Study / Textbook Correlation

M.Sc. Program in Informatics and Telecommunications

On the Modeling and Verification of Security-Aware and Process-Aware Information Systems

Datavetenskapligt Program (kandidat) Computer Science Programme (master)

Course Descriptions - Computer Science and Software Engineering

ML for the Working Programmer

ARMMS - Architecture Reference Model for Multilingual Software

STATUS REPORT ON MAUDE-NPA TOOL

Swiss Joint Master in Computer Science of the universities of Bern, Neuchâtel and Fribourg

How To Understand And Understand Common Lisp

VDI 2206 Prof. Dr. Magdy M. Abdelhameed

Firewall Verification and Redundancy Checking are Equivalent

Model Checking: An Introduction

Acknowledgement. Software Engineering. CS 3141: Team Software Project Introduction

Importance of Data Abstraction, Data Virtualization, and Data Services Page 1

Automated Formal Analysis of Internet Routing Systems

Software Engineering

Service-Oriented Architectures

SOFTWARE ENGINEERING PROGRAM

Master s Program in Information Systems

Master's Degree Program in Computer Science

STUDENT OUTCOMES ASSESSMENT PLAN (SOAP)

The Designer's Guide to VHDL

Translating Stochastic CLS into Maude

22C:22 (CS:2820) Object-Oriented Software Development

Software Architecture

Introduction to Formal Methods. Các Phương Pháp Hình Thức Cho Phát Triển Phần Mềm

Kirsten Sinclair SyntheSys Systems Engineers

UML-based Test Generation and Execution

Systems Integration: Co C mp m onent- t bas a e s d s o s ftw ft a w r a e r e ngin i eeri r n i g

Adversary Modelling 1

The System Designer's Guide to VHDL-AMS

Position Classification Flysheet for Computer Science Series, GS Table of Contents

School of Computer Science

CHAPTER 1 INTRODUCTION

How Router Technology Shapes Inter-Cloud Computing Service Architecture for The Future Internet

Application Design: Issues in Expert System Architecture. Harry C. Reinstein Janice S. Aikins

Master of Artificial Intelligence

CS422 - Programming Language Design

Automated Theorem Proving - summary of lecture 1

KWIC Exercise. 6/18/ , Spencer Rugaber 1

DIABLO VALLEY COLLEGE CATALOG

B-bleaching: Agile Overtraining Avoidance in the WiSARD Weightless Neural Classifier

Formal Verification of Software

Terms and Definitions for CMS Administrators, Architects, and Developers

Questions? Assignment. Techniques for Gathering Requirements. Gathering and Analysing Requirements

Transcription:

Language-oriented Software Development and Rewriting Logic Christiano Braga cbraga@ic.uff.br http://www.ic.uff.br/ cbraga Universidade Federal Fluminense (UFF) Language-oriented Software Development and Rewriting Logic p.1/39

Acknowledgments Prof. Narciso Martí-Oliet and the UCMaude Group. The Advanced Systems Research Group of the Computer Science Institute at UFF. The Brazilian Research Council, CNPq. Language-oriented Software Development and Rewriting Logic p.2/39

C.S. Graduate Program at UFF UFF: located in Niterói, RJ, Brazil; aprox. 22.000 undergraduate students, 3.000 graduate students, and aprox. 2.200 professors. PGC: 134 graduate students and 20 professors, in the following research areas: Parallel and distributed processing. Computer graphics and human-computer interaction. Combinatorial optimization and artificial intelligence. Mathematical modeling and power systems. Language-oriented Software Development and Rewriting Logic p.3/39

Advanced Systems Research Group Recently formed, with 4 staff and 10 graduate students. Our group has the following interests: Formal methods Mobile computing Real-time systems Software architecture Software adaptability Power management in computer systems (Under construction) web page: http://asr.ic.uff.br Language-oriented Software Development and Rewriting Logic p.4/39

Objective of this talk...... is to present our research initiatives, and in particular, our results while looking at rewriting logic as a semantic framework. Language-oriented Software Development and Rewriting Logic p.5/39

Talk Plan 1. First a software engineering approach that we call language-oriented software development (LoSD) is informally introduced. The LoSD approach concisely represents our line of research. 2. Next, LoSD is related with rewriting logic and the way formal tools are developed in the Maude system. Language-oriented Software Development and Rewriting Logic p.6/39

Talk Plan 3. Finally we motivate, exemplify and informally discuss how tool support has been given to the specification and analysis of modular operational semantics specifications and software architecture descriptions. Language-oriented Software Development and Rewriting Logic p.7/39

Language-oriented software development (LoSD) Is a software engineering approach that relies on formal software tools built using the syntax and semantics of the language from the problem domain. Examples of such formal tools are language transformers (such as W3 XSLT and Cordy s TXL), model checkers (such as CMU s SMV or Birmingham s PRISM), and theorem provers (such as SRI s PVS and (Cambridge and TU Munich) s Isabelle). Language-oriented Software Development and Rewriting Logic p.8/39

Some projects using LoSD A language-independent software documentation generation tool, combining Draco transformation tool and a CASE (Computer Aided Software Engineering) tool. (My own M.Sc dissertation at PUC-Rio, directed by Arndt von Staa.) Analysis of game strategies combining TXL and SMV. (M.Sc dissertation of Davi Romero at PUC-Rio, directed by Hermann Haeusler.) Analysis of communication protocols using TXL and SMV. (Ph.D. thesis of Carlos Bazilio at PUC-Rio, being directed by Hermann Haeusler.) Language-oriented Software Development and Rewriting Logic p.9/39

Language-oriented software development (LoSD) Language-oriented Software Development and Rewriting Logic p.10/39

Formal tools in rewriting logic and Maude In a nut shell : Rewriting logic (RWL) is a reflective logic: one can reason about RWL within RWL. RWL is a logic and a semantic framework: many logics, specification languages and models of computation can be represented in RWL. Maude is a fast implementation of RWL that allows meta-programming as a realization of RWL reflective features. Language-oriented Software Development and Rewriting Logic p.11/39

LoSD with Maude Language-oriented Software Development and Rewriting Logic p.12/39

Current projects We instantiate L, with two different languages: Case L = MSOS : Maude MSOS Tool, which gives tool support for the specification and analysis Mosses modular structural operational semantics (MSOS) specifications. Case L = CBabel : CBabel Tool, which gives tool support for the specification and analysis of software architecture descriptions. Language-oriented Software Development and Rewriting Logic p.13/39

Maude MSOS Tool (MMT) What is MMT? MMT gives tool support to modular structural operational semantics (MSOS). MSOS is a variation of Plotkin s structural operational semantics (SOS) with support to modular specifications, that is, specifications in MSOS may be defined as conservative extensions of existing MSOS specifications. Language-oriented Software Development and Rewriting Logic p.14/39

Maude MSOS Tool (MMT) Why MSOS? To illustrate the modularity problem of SOS, let us consider the following specification for the semantics of the binary operation with an environment (ρ). ρ e 0 e 0 ρ e 0 e 1 e 0 e 1 Language-oriented Software Development and Rewriting Logic p.15/39

Maude MSOS Tool (MMT) Why MSOS? Now if one wants to extend the semantics of with an environment (ρ) to add a store (σ, σ ), the previous rule would have to be modified. ρ e 0, σ e 0, σ ρ e 0 e 1, σ e 0 e 1, σ Language-oriented Software Development and Rewriting Logic p.16/39

Maude MSOS Tool (MMT) Why MSOS? Mosses MSOS solves the modularity problem in structural operational semantics. Transition labels carry the semantic information associated with computations and configurations are only value-added abstract syntax trees. e 0 X e 0 e 0 e 1 X e 0 e 1 Language-oriented Software Development and Rewriting Logic p.17/39

Maude MSOS Tool (MMT) Why MSOS? Components and are accessed through indices e {ρ = ρ 1 [ρ 0 ],...} e let ρ 0 in e end {ρ = ρ 1,...} let ρ 0 in e end Language-oriented Software Development and Rewriting Logic p.18/39

Maude MSOS Tool (MMT) Why MSOS? Indexed components in labels are of three different types. (More can be defined, if necessary.) read only (e.g. environments of bindings), read write (e.g. stores), write only (e.g. output). Language-oriented Software Development and Rewriting Logic p.19/39

Maude MSOS Tool (MMT) How is MMT implemented? MMT implements a formally defined and proven correct mapping from MSOS to RWL. MMT is implemented as an extension to Full Maude, a tool that endows Maude with an extensible module algebra. MMT supports a specification language called MSDF, also developed by Mosses. MSDF has interesting characteristics to allow concise language semantics specifications. Language-oriented Software Development and Rewriting Logic p.20/39

Maude MSOS Tool (MMT) How is MMT implemented? MSDF features: BNF style for grammar specification. Concise syntax for label declaration. Concise syntax for transition rule declaration. Implicit variable declaration. Implicit (and explicit) module inclusion. Implicit data type declaration for sequences and non-empty sequences. Built-in parameterized types: Map, Set and List. Typed abstract syntax trees. Language-oriented Software Development and Rewriting Logic p.21/39

Maude MSOS Tool (MMT) Example: CCS in MSDF Grammar declaration: BNF + Maude operator attributes. (msos PROCESS is Process. Process ::= 0. Process ::= Action ; Process [prec 20]. Process ::= Process + Process [assoc comm prec 30]. Process ::= Process Process [assoc comm prec 25].... Language-oriented Software Development and Rewriting Logic p.22/39

Maude MSOS Tool (MMT) Example: CCS in MSDF Label declaration with implicit sequence sort. Label = {trace : Action*,...}. Language-oriented Software Development and Rewriting Logic p.23/39

Maude MSOS Tool (MMT) Example: CCS in MSDF Rule declaration with implicit variables. [pre] (Action ; Process) : Process -{trace = Action,-}-> Process. Process1 -{...}-> Process1 [sum] -- ---------------------------------------------------- (Process1 + Process2) : Process -{...}-> Process1. Process1 -{trace = Action,-}-> Process1, Process2 -{trace = Action,-}-> Process2 [par2] -- ----------------------------------------------------------- (Process1 Process2) : Process -{trace = tau,-}-> Process1 Process2.... sosm) Language-oriented Software Development and Rewriting Logic p.24/39

Maude MSOS Tool (MMT) What can one do with MMT? MSDF specifications may be run and verified using Maude and the tools developed for the analysis of Maude specifications. Some experiments: Specified and model-checked several distributed algorithms described in Lynch s Distributed Algorithms book. Specified and model-checked simple algorithms written in CML, a concurrent functional language. Language-oriented Software Development and Rewriting Logic p.25/39

Maude MSOS Tool (MMT) What can one do with MMT? Some experiments: Specified and executed Incremental MSOS (IMSOS), which is an MSOS semantics for a set of abstract constructs for the specification of programming language semantics. With IMSOS the semantics of a programming language is given in terms of a mapping from its concrete syntax to the IMSOS abstract constructs. Language-oriented Software Development and Rewriting Logic p.26/39

Maude MSOS Tool (MMT) What can one do with MMT? Some experiments: An integration between MMT and the strategy language interpreter prototype developed by Martí-Oliet, Meseguer and Verdejo. (The MSDF specification of CCS presented in this talk was written together with Verdejo during this work.) Language-oriented Software Development and Rewriting Logic p.27/39

Maude MSOS Tool (MMT) MMT exists due to the collaboration of several people: Fabricio Chalub, E. Hermann Hæusler, José Meseguer, and Peter Mosses. Language-oriented Software Development and Rewriting Logic p.28/39

CBabel Tool (CBT) What is CBT? CBT gives tool support to the specification and analysis of software architecture descriptions written in the CBabel software architecture description language (ADL). CBabel was designed by Alexandre Sztajnberg and is a simple ADL that concisely captures relevant aspects of software architectures by means of contracts, such as sequential interaction, mutual exclusion, guarded interaction and quality-of-service (QoS). Language-oriented Software Development and Rewriting Logic p.29/39

CBabel Tool (CBT) Why CBabel? The purpose of architecture description Languages (ADLs) is to keep separated the description of how distributed components are connected from the descriptions of the internal behavior of each component. Language-oriented Software Development and Rewriting Logic p.30/39

CBabel Tool (CBT) Why CBabel? By using the concept of contracts, CBabel allows the treatment of coordination aspects in a more flexible manner when compared to other ADLs. CBabel also provides QoS contracts that cater for other non-functional aspects. (QoS contracts are not yet handled by the tool.) Language-oriented Software Development and Rewriting Logic p.31/39

CBabel Tool (CBT) Why CBT? A formal semantics for a architecture description language L provides: An unambiguous definition of what L means. The ability to formally reason about L and prove properties about architectures, such as coordination related properties. Moreover, if the specification is executable, the formal reasoning can be computer aided. Language-oriented Software Development and Rewriting Logic p.32/39

CBabel Tool (CBT) How is CBT implemented? CBT implements a formally defined transformation from CBabel to RWL. (Before our formalization, CBabel had no formal specification of its semantics. To prove our transformation correct, an abstract semantics would need to be specified.) CBT is implemented, like MMT and other Maude tools, as an extension to Full Maude. Language-oriented Software Development and Rewriting Logic p.33/39

CBabel Tool (CBT) Example: Producers, consumers, a buffer and a mutex connector. The following architecture can be drawn using our (under development) Eclipse environment, called FormArch... Language-oriented Software Development and Rewriting Logic p.34/39

CBabel Tool (CBT) Example: Producers, consumers, a buffer and a mutex connector. Generating the following textual description: (The modules PRODUCER, CONSUMER and BUFFER are not shown.) connector MUTEX { application PC-MUTEX { in port mutex@in1 ; instantiate BUFFER as buff ; in port mutex@in2 ; instantiate PRODUCER as prod ; out port mutex@out1 ; instantiate CONSUMER as cons ; out port mutex@out2 ; instantiate MUTEX as mutx ; exclusive{ link prod.producer@put to mutx.mutex@in1 ; mutex@in1 > mutex@out1 ; link mutx.mutex@out1 to buff.buffer@put ; mutex@in2 > mutex@out2 ; link cons.consumer@get to mutx.mutex@in2 ; } link mutx.mutex@out2 to buff.buffer@get ; } } Language-oriented Software Development and Rewriting Logic p.35/39

CBabel Tool (CBT) What can one do with CBT? CBabel descriptions may be run and verified using Maude and the tools developed for the analysis of Maude specifications. Several toy examples have been described and model checked. Unfortunately, the state space produced by our mapping from CBabel to RWL has a huge number of states, even for simple applications as the 5 philosophers. This has prevented us from developing more significant examples. Language-oriented Software Development and Rewriting Logic p.36/39

CBabel Tool (CBT) What can one do with CBT? We are currently exploring ways to make the mapping more efficient, perhaps paying the price of modularity and the natural representation of architectural concepts as objects and messages. Another research direction is the application of abstraction techniques. Language-oriented Software Development and Rewriting Logic p.37/39

CBabel Tool (CBT) CBT exists due to the collaboration of : Alexandre Rademaker and Alexandre Sztajnberg. Language-oriented Software Development and Rewriting Logic p.38/39

Language-oriented software development and rewriting logic Thank you! Language-oriented Software Development and Rewriting Logic p.39/39