1 Practical Issues, Odds and Ends Per Brand. 2 Base Environment - Reference Manual Table of Contents 1 Introduction 2 Type Structure and Description Format.

Slides:



Advertisements
Similar presentations
Chapter 6 Type Checking. The compiler should report an error if an operator is applied to an incompatible operand. Type checking can be performed without.
Advertisements

Tutorial 8: Developing an Excel Application
SYSTEM PROGRAMMING & SYSTEM ADMINISTRATION
Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
Chapter 7: User-Defined Functions II
Chapter 7 User-Defined Methods. Chapter Objectives  Understand how methods are used in Java programming  Learn about standard (predefined) methods and.
The Web Warrior Guide to Web Design Technologies
George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 4.
1 Programming for Engineers in Python Autumn Lecture 5: Object Oriented Programming.
C. Varela; Adapted w/permission from S. Haridi and P. Van Roy1 Declarative Computation Model Kernel language semantics Carlos Varela RPI Adapted with permission.
Encapsulation by Subprograms and Type Definitions
Run time vs. Compile time
C. Varela; Adapted w/permission from S. Haridi and P. Van Roy1 Declarative Programming Techniques Non-declarative needs (VRH 3.8) Program design in the.
Ch4: Software Architecture and Design. 1 Modules: Interface vs. Implementation (contd..)  Interface design considerations:
1 Programming systems for distributed applications Seif Haridi KTH/SICS.
Abstract Data Types and Encapsulation Concepts
1 Outline 7.1 Introduction 7.2 Implementing a Time Abstract Data Type with a Class 7.3 Special Attributes 7.4Controlling Access to Attributes 7.4.1Get.
Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access memory.
C++ fundamentals.
Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department.
Java Course Outline Kumar Harshit, USW. Course Description Teaches students to program using the Java programming language with the help of the Netbeans.
Review of C++ Programming Part II Sheng-Fang Huang.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
Chapter 3.1:Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access.
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
Unit J: Creating a Database Microsoft Office Illustrated Fundamentals.
LESSON 2 CREATING A JAVA APPLICATION JAVA PROGRAMMING Compiled By: Edwin O. Okech [Tutor, Amoud University]
Tutorial 11 Using and Writing Visual Basic for Applications Code
CST203-2 Database Management Systems Lecture 2. One Tier Architecture Eg: In this scenario, a workgroup database is stored in a shared location on a single.
Introduction to Microsoft Access 2003 Mr. A. Craig Dixon CIS 100: Introduction to Computers Spring 2006.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Recap (önemli noktaları yinelemek) from last week Paradigm Kay’s Description Intro to Objects Messages / Interconnections Information Hiding Classes Inheritance.
Object Oriented Design Jerry KotubaSYST Object Oriented Methodologies1.
Introduction to Java Programming with Forte Y. Daniel Liang.
Hello.java Program Output 1 public class Hello { 2 public static void main( String [] args ) 3 { 4 System.out.println( “Hello!" ); 5 } // end method main.
Netprog: Java Intro1 Crash Course in Java. Netprog: Java Intro2 Why Java? Network Programming in Java is very different than in C/C++ –much more language.
1 Exception Handling, Modules, Names Per Brand. 2 Exception Handling An exception is any expression E. To raise the exception, one executes the following.
Selected Topics in Software Engineering - Distributed Software Development.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 13 Introduction to Classes.
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.
Unit-1 Introduction Prepared by: Prof. Harish I Rathod
Games Development 2 Lua Scripting CO3301 Week 6. Contents Introducing Lua –Comparison with Python Lua Language Overview Interfacing Lua with C++
C++ Programming Basic Learning Prepared By The Smartpath Information systems
Topic 1 Object Oriented Programming. 1-2 Objectives To review the concepts and terminology of object-oriented programming To discuss some features of.
SOFTWARE DESIGN. INTRODUCTION There are 3 distinct types of activities in design 1.External design 2.Architectural design 3.Detailed design Architectural.
Java Programming Java Basics. Data Types Java has two main categories of data types: –Primitive data types Built in data types Many very similar to C++
Copyright © Mohamed Nuzrath Java Programming :: Syllabus & Chapters :: Prepared & Presented By :: Mohamed Nuzrath [ Major In Programming ] NCC Programme.
Chapter 11: Introduction to VBA Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University Name.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
Chapter 16 UML Class Diagrams.
Today… “Hello World” ritual. Brief History of Java & How Java Works. Introduction to Java class structure. But first, next slide shows Java is No. 1 programming.
C++ Programming Lecture 14 Arrays – Part I The Hashemite University Computer Engineering Department (Adapted from the textbook slides)
Chapter – 8 Software Tools.
THE EYESWEB PLATFORM - GDE The EyesWeb XMI multimodal platform GDE 5 March 2015.
CSE 303 Concepts and Tools for Software Development Richard C. Davis UW CSE – 10/11/2006 Lecture 7 – Introduction to C.
METADATA IN.NET Presented By Sukumar Manduva. INTRODUCTION  What is Metadata ? Metadata is a binary information which contains the complete description.
Preface IIntroduction Course Objectives I-2 Oracle Complete Solution I-3 Course Agenda I-4 Tables Used in This Course I-5 The Order Entry Schema I-6 The.
Introduction to DBMS Purpose of Database Systems View of Data
Java Review Hello..This ppt is to give you an introduction about java and why it is soo special The segments all discussed here are the crucial parts of.
CMPE419 Mobile Application Development
Declarative Computation Model Kernel language semantics (Non-)Suspendable statements (VRH ) Carlos Varela RPI October 11, 2007 Adapted with.
Introduction to Database Systems
Classes & Objects: Examples
Introduction to DBMS Purpose of Database Systems View of Data
Declarative Computation Model Single assignment store (VRH 2
Course Overview PART I: overview material PART II: inside a compiler
CMPE419 Mobile Application Development
Presentation transcript:

1 Practical Issues, Odds and Ends Per Brand

2 Base Environment - Reference Manual Table of Contents 1 Introduction 2 Type Structure and Description Format 3 Values 4 Numbers 5 Literals 6 Records, Tuples, and Lists 7 Text 8 Procedures and Cells 9 Chunks 10 Control 11 Infix Notations 12 Miscellaneous Bibliography Index

3 Base Environment Contains a short description of all language entities (types) Contains a short description of fundamental operations on language entities Contains a number of useful abstractions on language entities Part 6 - Records, tuples, lists –Many useful list/record abstractions Part 10 - Control –What you can do with 1st class threads Part 4 - Numbers –Arithmetical operations Part 9- Chunks –Also arrays, dictionaries

4 Chunks A chunk is similar to a record except that:.The label of a chunk is an Oz-name..There is no Arity operation available on chunks. This means one can hide certain components of a chunk if the feature of the component is an Oz-name that is visible only (by lexical scoping) to user-defined operations on the chunk.

5 Chunks II A chunk is created by: {NewChunk Record ?Chunk}. This creates a chunk with the same arguments as the record, but having a unique label. local X in {Browse X={NewChunk f(c:3 a:1 b:2)}} {Browse X.c} end This will display the following. – (a:1 b:2 c:3) 3

6 Chunks-III Chunks and cells are primitive in Oz. –Objects, classes etc. can be defined in terms of them –Interesting as the smaller the kernel of a programming system is predictability good properties for program analysis, etc. For our purposes we will briefly consider arrays and dictionaries- abstractions that can be built on top of chunks

7 Arrays Arr={NewArray nil} –creates an array of 100 elements indexed by 1 to 100 that are initialized to nil {Array.put Arr 1 a} or Arr.1:=a X={Array.get Arr 1}or X=Arr.1 R={Array.toRecord +Label +Array} –creates a record(tuple) that is a stateless copy of the array –(you may find this useful for distribution)

8 Dictionaries Dict={NewDict} –creates a dictionary and association between Keys and Entries –Keys are atoms, integers, or names –Entries can be anything {Dictionary.put Dict Key WhatEver} or Dict.Key:=WhatEver X={Dictionary.get Dict Key}or X=Dict.Key X={Dictionary.condGet Dict Key Default} –equivalent to Dictionary.get if there is a entry in the Dictionary for that key- otherwise X=Default X={Dictionary.keys Dict} –returns a list of current keys X={Dictionary.entries Dict} –returns a list of current entries of form Key#Entry R={Dictionary.toRecord +Label +Dict} –creates a record(tuple) that is a stateless copy of the dictionary –(you may find this useful for distribution)

9 System Modules Part I: Application Programming –1 Application Support: Application –2 Module Managers: Module need to know this Part II: Constraint Programming not needed for this course Part III: Distributed Programming will be considered later Part IV: Open Programming –17 Files, Sockets, and Pipes: Open –18 Operating System Support: OS These are just the OZ interface to OS and File system services Read on need

10 More System Modules Part V: System Programming –19 Persistent Values: Pickle –20 Emulator Properties: Property read for overview - read on need –21 Error Formatting: Error –22 System Error Formatters: ErrorFormatters –23 Memory Management: Finalize –24 Miscelleanous System Support: System read for overview - details on need Part VI: Window Programming – 25 The Module Tk – 26 Graphical Tools: TkTools deals with graphics you won’t need this because we have done it for you Part VII: Miscellaneous –27 Support Classes for Objects: ObjectSupport

11 Pickle A pickle is a file that represents stateless Oz graphs (transitive closure) Any stateless value can be pickled - i.e. stored on file and retrieved from file Stateless includes numbers, atoms, strings, procedures, classes –stateless includes both data and code Stateless does not include cells, objects, single-assignment variables The Mozart system consists of two parts –the engine (a virtual machine) –a number of Oz modules –all the Oz modules exist in pickled form - when you start Oz the Oz- base environment modules will be loaded eagerly and the other modules upon need (access) The user can pickle and unpickle himself

12 Pickles-cont’d declare class Registry … end class SubRegistry from Registry … end X=[a b c d] proc{Q U} … end proc{P A B} {Q X} end Y=mySave(a:SubRegistry b:[e f g] c:P} {Pickle.save Y ‘xxx’} %% everything saved directly or %% indirectly declare X={Pickle.load ‘xxx’} %% get everything

13 Resources Resources are references from Oz to system resources –files, file system –windows, standard input/output Resources may not be pickled - reasons –Security –Unclear scoping - dynamic or static dynamic - resources of loader static - resources of saver Instead pickle functors that are dynamically linked to resources upon loading

14 Stand-alone -.ozf Standalone application, file p1.oz ( ozc -c p1.oz ) results in the file p1.ozf functor import System Application define {System.show 'hello world'} {Application.exit 0} end ozengine p1.ozf