Dr David Greaves – University of Cambridge Computer Laboratory. Using Simple Pushlogic “Suppressing Ubicomp Skirmishes” David Greaves, Daniel Gordon, Atif.

Slides:



Advertisements
Similar presentations
Reliable Scripting Using Push Logic Push Logic David Greaves, Daniel Gordon University of Cambridge Computer Laboratory Reliable Scripting.
Advertisements

David Greaves - Savoy Place, London, May Suppressing Ubicomp Skirmishes Dr David Greaves Lecturer University of Cambridge Computer Laboratory.
Control of the Home Network Pebbles for Autohan and Oxygen Dr David Greaves University of Cambridge Umar Saif : MIT LCS David Milward.
Programming Languages and Paradigms
C O N T E X T - F R E E LANGUAGES ( use a grammar to describe a language) 1.
Web Services Darshan R. Kapadia Gregor von Laszewski 1http://grid.rit.edu.
Remote Procedure Call (RPC)
Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
1 CMI O2S/AUTOHAN OCT 04 Ubiquitous Computing in the AutoHAN/Oxygen Project The evolution of application software in the age of pervasive computing Dr.
Network Operating Systems Users are aware of multiplicity of machines. Access to resources of various machines is done explicitly by: –Logging into the.
Embedded Network Controller with Web Interface Bradley University Department of Electrical & Computer Engineering By: Ed Siok Advisor: Dr. Malinowski.
Chapter 1: An Overview of Computers and Programming Languages J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program.
Mi-Joung choi, Hong-Taek Ju, Hyun-Jun Cha, Sook-Hyang Kim and J
CS 550 Amoeba-A Distributed Operation System by Saie M Mulay.
Application architectures
Communication in Distributed Systems –Part 2
VB in Context Michael B. Spring Department of Information Science and Telecommunications University of Pittsburgh Pittsburgh, Pa 15260
Systems Architecture, Fourth Edition1 Internet and Distributed Application Services Chapter 13.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages C++ Programming:
16: Distributed Systems1 DISTRIBUTED SYSTEM STRUCTURES NETWORK OPERATING SYSTEMS The users are aware of the physical structure of the network. Each site.
Cambodia-India Entrepreneurship Development Centre - : :.... :-:-
An Introduction to Rational Rose Real-Time
TIBCO Designer TIBCO BusinessWorks is a scalable, extensible, and easy to use integration platform that allows you to develop, deploy, and run integration.
The Operating System. Operating Systems (F) What you need to know about –operating system as a program; –directory/folder.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 13 Slide 1 Application architectures.
 Chasis / System cabinet  A plastic enclosure that contains most of the components of a computer (usually excluding the display, keyboard and mouse)
INTRODUCTION TO WEB DATABASE PROGRAMMING
David Greaves - SENSORCOM08 - France. Using a.net Checkability Profile to Limit Interactions between Embedded Controllers. David Greaves, Atif Alvi Tope.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Timed UML State Machines Ognyana Hristova Tutor: Priv.-Doz. Dr. Thomas Noll June, 2007.
There are different types of translator. An Interpreter Interpreters translate one instruction at a time from a high level language into machine code every.
INTRODUCTION TO COMPUTING
D75P 34R HNC Computer Architecture 1 Week 9 The Processor, Busses and Peripherals © C Nyssen/Aberdeen College 2003 All images © C Nyssen /Aberdeen College.
CS 1308 Computer Literacy and the Internet. Introduction  Von Neumann computer  “Naked machine”  Hardware without any helpful user-oriented features.
Java Introduction Lecture 1. Java Powerful, object-oriented language Free SDK and many resources at
Lecture 15 Introduction to Web Services Web Service Applications.
Introduction and Features of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++
Guide to Linux Installation and Administration, 2e1 Chapter 10 Managing System Resources.
Invitation to Computer Science 5 th Edition Chapter 6 An Introduction to System Software and Virtual Machine s.
Copyright © 2007 Addison-Wesley. All rights reserved.1-1 Reasons for Studying Concepts of Programming Languages Increased ability to express ideas Improved.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Checkable Domain Management with Ontology and Rules Atif Alvi and David J. Greaves Computer Laboratory University of Cambridge, UK
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Memory: Relocation.
Android Security Model that Provide a Base Operating System Presented: Hayder Abdulhameed.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
Concurrency Properties. Correctness In sequential programs, rerunning a program with the same input will always give the same result, so it makes sense.
Computer Hardware – System Unit
Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  What Operating Systems Do  Computer-System Organization  Computer-System Architecture  Operating-System Structure.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
From Natural Language to LTL: Difficulties Capturing Natural Language Specification in Formal Languages for Automatic Analysis Elsa L Gunter NJIT.
Software Systems Division (TEC-SW) ASSERT process & toolchain Maxime Perrotin, ESA.
An operating system (OS) is a collection of system programs that together control the operation of a computer system.
Application architectures Advisor : Dr. Moneer Al_Mekhlafi By : Ahmed AbdAllah Al_Homaidi.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Monitoring Dynamic IOC Installations Using the alive Record Dohn Arms Beamline Controls & Data Acquisition Group Advanced Photon Source.
DIGITAL TECHNOLOGY. 20 Questions  Pair off with another student within your table.  Both of you are to think of your favorite in a specific category.
Introduction to Operating Systems Concepts
Names and Attributes Names are a key programming language feature
Computer Hardware – System Unit
Control Unit Lecture 6.
Technology Literacy Hardware.
Java programming lecture one
Chapter 1: An Overview of Computers and Programming Languages
C++ Programming: From Problem Analysis to Program Design
Topics Introduction Hardware and Software How Computers Store Data
Analysis models and design models
There are different types of translator.
Presentation transcript:

Dr David Greaves – University of Cambridge Computer Laboratory. Using Simple Pushlogic “Suppressing Ubicomp Skirmishes” David Greaves, Daniel Gordon, Atif Alvi O2S/AutoHAN Project University of Cambridge Computer Laboratory

Dr David Greaves – University of Cambridge Computer Laboratory. A Vision of Evolution for UbiComp 1.A myriad of devices connected to the network. 2.All devices are connected and share a common, all-pervasive, middleware. 3.Mixed reality interaction is the norm – myriads of scripts.

Dr David Greaves – University of Cambridge Computer Laboratory. Home Networking - First the seeds DVD player Television Amplifier Camcorder Extension display Kitchen Home Cinema Study Modem Security cameras Video child monitor camera Access Fax is printer ? Remote security ? Pay per listen ? How many loudspeakers ? Doorbell with headphones ? Burglar alarm phones out ? CATV Internet POTS

Dr David Greaves – University of Cambridge Computer Laboratory.  1. The following separate devices, each of which can be individually useful in a networked home: Let's look at what a modern TV set contains: A Device: A collection of Pebbles and a Canned App  2. A canned application that joins the components. RF Tuner Colour Display Ni-Cam Audio Decoder Power Amplifier Surround Sound Decoder IR Receiver Teletext Decoder MPEG Decoder Programming Memory Front Panel User Interface

Dr David Greaves – University of Cambridge Computer Laboratory. AutoHAN Device Decomposition 1. Devices register themselves as a collection of Pebbles and Bundles. 2. Devices expose a command API for each internal device (Pebble). 3. Devices export their canned application's effects on other Pebbles.

Dr David Greaves – University of Cambridge Computer Laboratory. Device API Evolution 1. Early, wire protocol RPC APIs:  Sun RPC, CORBA, HAVI, MOSTNET 2.Evolvable XML APIs with Reflection:  UPnP, EDDL, (SNMP), XMLRPC, SOAP, WSDL 3.Self-Assembling Directory Services  UPnP, LDAP, SCP, SSDP, INS, … 4.Namespaces and Ontologies  OWL, OWL-S, DAML, RDF 5.Code Reflection

Dr David Greaves – University of Cambridge Computer Laboratory. Plant Control Stack Network: LAN or FIELDBUS DEVICE INVENTORY DESCRIPTIONS DATABASE STATUS DATABASE CONTROLLING APPLICATIONS SYSTEM LIVE/SAFE CONSTRAINTS PLANT DEVICES (Sensors, Valves, Pumps...) PLANT MODEL (Known Sensor/Actuator Feedback Paths, Autonomous Controller Behaviour) VIEWER TOOLS

Dr David Greaves – University of Cambridge Computer Laboratory. Ontology Mapping – a future norm ? Orange Jam Living-Room Front-Door-Bell StartUP Marmalade Lounge FrontDoorBell SwitchOn Ontologies can be nested: Claret isa RedWine isa Wine isa Drink isa Food Ontology Web Language Service (OWL-S) Ontologies can be mapped:

Dr David Greaves – University of Cambridge Computer Laboratory. Controllers versus the Controlled API Reflection is now a Mature Technology –WSDL, SOAP, XMLRPC, UPnP, It will be further deployed (?) –X-by-wire, Field Busses, Sensor Networks, CAN. –EDDL, XDDL, Embedded Systems Code Reflection has seen virtually no work! –Canned Applications –Self-hydrating Applications –User Scripting –Automated Learning (Pebbles and Goals)

Dr David Greaves – University of Cambridge Computer Laboratory. Code Reflection A device must expose the proactive behaviour of its canned application(s) –Actual source code (constrained language) –Proof carrying actual source code –Summary of behaviour –E.G. I will not send control messages when I am in standby mode. –E.G. I am always off between 1:00 and 5:00. Device is banned for remote operations unless proof obligations are met.

Dr David Greaves – University of Cambridge Computer Laboratory. Also for holding User Scripts Record both Simpson’s shows tonight and charge to Pam’s pay-per-view account. Create a video call to Peter of best quality. Whenever the doorbell is pressed during darkness turn on the porch light for 10 minutes. Do not render dialog or other popups when video recording is taking place.

Dr David Greaves – University of Cambridge Computer Laboratory. Rules of the Domain No rule should issue a command under the same circumstances where another rule issues the counter-rule. Jonny is not allowed to spend more than 2 pounds per day on pay-per- listen. Fire Alarm must mute all music sources. The front gates must always be remotely openable by some method or other.

Dr David Greaves – University of Cambridge Computer Laboratory. An Approach: Pushlogic All applications and rules are held in Pushlogic. The world is made of disjoint ‘Domains’ that devices and rules enter and leave. Devices and rules enter on a first-come basis and so take priority over subsequent disagreeing arrivals Pushlogic rules can be model-checked in tens of milliseconds on embedded processors (eventually?).

Dr David Greaves – University of Cambridge Computer Laboratory. Pushlogic Features Every application is encoded as/converted to a list of state transition rules. Rules are re-hydrated to use only static bindings. All constraints on behaviour are converted to safety and liveness forms. Monotonicity requirements on failure or removal A symbolic model checker finds conflicts and satisfaction. All rules are interpreted in Herbrand form so as to tolerate arbitrary state space growth after joining a domain.

Dr David Greaves – University of Cambridge Computer Laboratory. Pushlogic Features 2 A declarative bytecode with runtime system. Various compilers envisaged, one developed so far. Specifies timed automata using idempotent executable rules. Interfaces to streams, sensors, actuators and other Bundles. Supports a dynamic population of devices and scripts. Rules are re-hydrated to use only static bindings. Source code looks like C++/Java. application is encoded as/converted to a list of state transition rules. Automated formal checking (CTL) - At compile time/At load time/(Optionally) at run time

Dr David Greaves – University of Cambridge Computer Laboratory. Mechanism View of Pushlogic All variables can have safe values defined for them. Controlled devices can fail or self-reset to a safe value. Controlling scripts are reversible, so that a failure feeds back to the control source in a defined way. Feedback form is intrinsic or explicit. System behaves like a ‘mechanism’: both the controller and the controlled can push on each other.

Dr David Greaves – University of Cambridge Computer Laboratory. Pushlogic Restrictions All integrators must be inside differentiators: if (x != x_last) { sum := sum + 1; x_last := x } All pointer, arithmetic and time calculations must be reduced to undetermined boolean inputs. Dynamic allocation only performed at bundle load time (SPL1). All assertions are in CTL.

Dr David Greaves – University of Cambridge Computer Laboratory. Object bundle Source Form 1 Compiler 1 Re- Hydration Source Form 1 Source Form 1 Object bundle Object bundle Object bundle Source Form 2 Compiler 2 Source Form 2 Source Form 2 Object bundle Object bundle Re- Hydration Re- Hydration Re- Hydration Bound bundle Bound bundle Bound bundle Bound bundle Execution Platform Execution Platform Execution Platform Compile Time Checker Bundle Checker Load Time Checker (Run Time Checker ) Domain of participation network Device bindings Semantic Web Push Logic Compile/bind/ execute Flow diagram

Dr David Greaves – University of Cambridge Computer Laboratory. Compilation Method Parse input file(s). Break threads into arcs at blocking primitives. Guard each arc by a runtime program counter being set to a label constant and create rules to update the program counters. Repeated symbolic evaluation of arc set until fixed point reached. Perform bundle checks using internal model checker. Generate declarative bytecode bundle, containing a mix of –Executable rules (v:= e, …) –CTL assertions (always, live, until, …).

Dr David Greaves – University of Cambridge Computer Laboratory. Compiler Internal Flow Diagram

Dr David Greaves – University of Cambridge Computer Laboratory. Compile-Time Checks Safe Value Check –There exists a setting of the variables where each is in a safe state and all executable rules hold. Rule Consistency –No two rules will try to set the same variable to different values at any one time. Idempotency Check –No ring of rules exists that causes an observable output to oscillate when rules are obeyed more than once with the same input settings. Push Back Check –For any unilateral change in any output, to any safe value of that output, internal variables or inputs to the bundle can be changed, again to safe values, so that all rules hold User’s Embedded and Imported CTL Expressions –Safety, liveness and until assertions may be embedded in the source. These are checked against a Herbrand-style interpretation of the bundle, so that any number of concurrently loaded bundles are sure to be consistent. Monotonicity Check –Rules cannot cease to hold when an un-associated (separate) bundle or device leaves.

Dr David Greaves – University of Cambridge Computer Laboratory. Also, “Design-Time” Ubi-Comb Components are brought together: –As IP and devices from many suppliers –Meta-info ranging from data-sheets to machine- readable formal specs –Often a rapid time-to-market requirement –Sometimes a live-insertion requirement Examples - Oil Rig or Brewery Plant Control, - Automotive CAN Network - System-On-Chip VLSI - Design of a PDA

Dr David Greaves – University of Cambridge Computer Laboratory. Research Challenges Can embedded RAM afford XML protocols ? Can embedded processors run the model check phase ? How much application code can easily be ported to a formal-proof-amenable form ? –eg. Can we implement a full TiVo PVR ? How to merge domains on the fly ? –eg. Two sets of train carriages become a single train. How to modify conventional APIs to hold less state (eg. Posix Sockets) ?

Dr David Greaves – University of Cambridge Computer Laboratory. Current Status Implemented on top of a distributed tuple space paradigm for distributed computing. Compiler built (10K lines of SML and C++). Runtime system runs on Linux, raw PC motherboards and our Molly cards. Various applications and embedded devices constructed. GUI for interactive monitoring/debugging.

Dr David Greaves – University of Cambridge Computer Laboratory. CD Player – Pebble Decomposition

Dr David Greaves – University of Cambridge Computer Laboratory. CD Player: Tuple Space View

Dr David Greaves – University of Cambridge Computer Laboratory. Heating Controller

Dr David Greaves – University of Cambridge Computer Laboratory. GUI Example

Dr David Greaves – University of Cambridge Computer Laboratory. Clock and DVD Player

Dr David Greaves – University of Cambridge Computer Laboratory. Future Work Re-hydration stage not implemented. Domain checker not implemented. Compilation of bytecode to ROM-able machine code (PIC) and integrate with CAN car node checking project. Some larger examples still need exploration. Talks with industrial collaborators who might use it ? Further HCI and multi-view editing projects.

Dr David Greaves – University of Cambridge Computer Laboratory. The End The Pebbles, AutoHAN and Oxygen O2S Teams