Bridging Python to C++ - and vice-versa
|
|
|
- Alan O’Brien’
- 10 years ago
- Views:
Transcription
1 Bridging Python to C++ - and vice-versa Jack Jansen Centrum voor Wiskunde en Informatica [email protected] Abstract I found myself in need of good access to C++ functionality from Python. By good I mean: more than simply being able to call C++ routines or methods, but also the ability to subclass C++ baseclasses in Python, and subclass Python baseclasses in C++, similar to the functionality PyObjC [1] provides when you need interoperability between Python and Objective-C. The objective is tackled by extending the standard (but little known:-) bgen bridge to be able to parse C++ headers, teaching it about C++ objects, inheritance and callbacks and exposing the result as a Python extension module. There are various other solutions that allow you to automatically generate Python interfaces to C++ libraries, but I could not find any that I really liked: most are lacking in functionality, such as bidirectional subclassing, some are bloatware, some are ugly. So in good open source tradition I decided to try and do better. At the time of writing (October 2005) this is still work in progress, so this paper will focus more on the solutions chosen than on the actual tool. The problem Over the last two years the SEN5 group at CWI has been busy designing and implementing the Ambulant Player [2], a multimedia playback engine. One of the design goals for the Ambulant Player is to provide the research community (including ourselves) with a framework multimedia player in which all components can easily be replaced to test new ideas, while all other components continue working. This allows one to concentrate on the issue at hand, such as new scheduling algorithms, without having to worry about implementing communication, rendering, user interfaces, etc. For the purpose of this paper we will mention only one other design goal: the implementation should be CPU-efficient and portable, so it can be deployed not only on well-connected desktop machines but also on low-power handheld devices with relatively low-bandwidth network connections. The figure shows the general design of the playback engine, with multiple stacked boxes denoting that there may be more than one implementation of a module (renderers for different media types, for example). Each of the components is replaceable, and all the interfaces are well-defined. Because of the efficiency goal C++ was chosen as the initial implementation language, even though it somewhat conflicts with the goal of easy extensibility. Previous experience of Machine independent Machine dependent Parser DOM tree Scheduler Layout Manager Datasource Playable Renderer Surface Datasource Playable Renderer Playable GUI window the team with using the Python-based GRiNS player on low-power devices were rather disappointing, and similar stories about Java and other HLLs seemed to corroborate that. Single instances Multiple instances
2 This summer we started on an attempt to have our cake and eat it too, by opening up the Ambulant API to Python. This will allow rapid development of new ideas, while the performance cost of using a HLL is only incurred in that case. Because we wanted each and any component to be replaceable we needed a bridging solution that not only allowed Python code to call functions and methods in C++, but also wrapping Python objects transparently as C++ objects and subclassing of C++ baseclasses in Python and vice versa. Solutions we did not pick The first solution we did not pick was a hand-coded bridge. The current API consists of about 50 interfaces with about 250 methods total, and as the engine is still in active development it is a moving target. This would make the maintenance cost of hand coding, even with tools such as Pyrex, too high. So we needed an automatic tool to generate the bridge, which quickly pointed to the Bgen tool because the author happens to be pretty familiar with it. But, of course, in a paper one should state that various solutions were examined and found wanting, so here is a list of tools we did not use: Swig [3] is probably the most popular tool, and has the advantage that it can generate bridges to various languages. But it has a very serious drawback: the code it generates is a mix of C or C++ and Python, and pretty much impossible to debug, even attempting to read it is a challenge. Support for additional datatypes is also a pain and requires adding directives to the.h or.i files. And new, incompatible versions are released every couple of months. Boost [4] comes with a huge embedding framework that appears to be impossible to work around. While low-power devices are not a primary target for the bridge this still appeared to be a bit too much of a good thing. In all fairness, Sip [5] was not on the radar until too late (about two weeks before this paper was written:-). It seems to be more stable and produce better code than Swig, but it shares its directive problem. The C++ and Python object model I will assume that readers are familiar with the C++ object model, and only step aside for a moment to explain the main points about the Python object model. We concentrate here on the so-called new style classes, which were introduced in Python 2.2. The definitive reference for these are PEP 252 [6] and PEP 253 [7]. Here I will only say that the new Python object model provides enough framework to interoperate with all the behavior that other languages may require: splitting of allocation and initialization of objects, easy calling of base class methods, cross-language access to members in base classes and much more. The bgen tool Bgen is a little-known part of the Python core distribution. It was written over 10 years ago by Guido van Rossum, and while it is in principle a general tool its main application has always been the generation of Python extension modules that interface to the MacOS toolbox modules. This history is reflected in a number of design choices, but the generality of the tool has allowed it to keep up with the changing times fairly easily. Here is what bgen does in a nutshell: 1. Parse a standard C.h file, without any adornments such Swig or Sip require. This is done with a regular expression parser that has very limited knowledge of the C language, but manages to find the function declarations and deduce the parameters, etc. EXTERN_API( void ) HideDialogItem( DialogRef thedialog, DialogItemIndex itemno) ONEWORDINLINE(0xA827);
3 EXTERN_API( Boolean ) IsDialogEvent(const EventRecord * theevent) ONEWORDINLINE(0xA97F); 2. Read a user-supplied set of filters and transforms, and apply these to the declarations. These transforms can change parameter signatures in a pretty powerful way. This is important, because it allows things like representing a C negative return value as an exception, or a pair of arguments const char *buf, int *bufsize as a Python string. The filter can also drop declarations based on unsupported types, names, etc. 3. Decide whether the resulting declaration should be treated as a normal function or as a method. Many C toolkits follow a somewhat object-oriented paradigm by having a standard first (or last) argument, as in HideDialogItem(DialogRef thedialog,...). These will become methods of the Window object on the Python side without any additional glue code such as Swig needs. 4. The resulting declarations are dumped as Python source, which will be executed later. f = Method(void, 'HideDialogItem', (DialogRef, 'thedialog', InMode), (DialogItemIndex, 'itemno', InMode), ) methods.append(f) foo.h Parse Filter foogen.py Generate code foomodule.c fooscan.py RE's and rules foosupport.py Type declarations and glue f = Function(Boolean, 'IsDialogEvent', (EventRecord_ptr, 'theevent', InMode), ) functions.append(f) 5. Read a user-supplied file of type declarations. Bgen contains an extensible library of predefined types, for which it knows how these should be initialized, converted from Python to C and viceversa, passed to C and cleaned up. The library not only contains the standard ints, floats and strings but also various types of buffers and exception/error conditions, and wrapper types that encapsulate a C type, usually a pointer, in a Python object. The extensible nature is important here, because together with the transformation mentioned earlier it allows fairly natural signatures on the Python side. DialogRef = OpaqueByValueType("DialogRef", "DlgObj") DialogItemIndex = Type("DialogItemIndex", "h") 6. Now it is time to read the function and method declarations again. Usually the type declarations will include at least one wrapped object to which the methods are added. The non-method functions are added to a module object, as are the wrapper objects. module = MacModule('_Dlg', 'Dlg', includestuff, finalstuff, initstuff) object = MyObjectDefinition('Dialog', 'DlgObj', 'DialogRef') module.addobject(object) execfile("dlggen.py") for f in functions: module.add(f) for f in methods: object.add(f)
4 7. Finally, bgen recursively iterates over the module to generate the C code. This is actually a fairly simple process, because a lot of delegation is used. For example, to generate the argument parsing a method generator will first call the declare and initialize method of each argument (which will in turn delegate to their types), then output the first bit of the PyArg_Parse call, then call the getargs- Format method for each argument to return the format character(s), then call getargsargs for each argument to get the arguments needed for the PyArg_Parse call. Extending bgen to C++ Extending Bgen to work for C++ in stead of for C required work in a number of areas. First of all, the parser needs to become quite a bit more powerful, because it will have to learn about scopes (for classes and namespaces) plus all the extra gunk functionality such as argument default values and inline functions. Initially we thought a tool like gcc-xml [8] would be needed to parse the header files, but luckily we decided to try a quick regular expression hack first, and... Lo and behold, it worked fine! The trick was to create two RE parsers, one to be used outside class declarations and one inside, and to switch them on the class keyword and counting braces. Adding the methods to the relevant objects was actually simpler in C++ than in C, because the parser has all the information and does not need to depend on user-provided instructions. Next we needed to handle name overloading, and we decided to cop out on that for the moment: duplicate names get _1, _2, etc appended for the time being. But we envision using the same trick as for constructors later. Constructors turned out to map fairly well to the Python object model, except for multiple constructor signatures. This is the same problem as general name overloading, but here we really needed the overloading. It turns out that if is fairly easy to implement multimethods in a Python C extension module by doing a sequence of PyArg_Parse calls if you take some care in which order you do them: if (PyArg_Parse(_args, i, &ival)) { // body for method(int ival) } else if (PyArg_Parse(_args, s, &sval)) { // body for method(const char *sval) } Support for std::string and such was just more code, nothing special. Other STL types we have punted on for the moment. Same for exceptions and operator overloading: they are not implemented yet but they should not pose any special problems (he says, optimistically:-). At this point we had a fairly functional bridge that allowed calling C++ methods and functions from Python, and the next task was generating the reverse. We noted that all the relevant information was still in the generated Python file with the declaration info, so the only thing we needed to do was re-read it but putting the info in completely different implementations of Module and ObjectDefinition. These would then generate C++ to Python bridge code in stead of the reverse. And even this turned out not to be all that much work: passing an argument from Python to C++ is pretty similar to passing a return value from C++ to Python and vice versa, so most of the code was there, it only had be be refactored a bit and driven in a different way. The same thing turned out to be true for generating the.h and.cpp files for the reverse bridge, which was again similar to generating the PyTypeObject and PyMethodDef structures and the actual implementations of the methods.
5 There were two areas that we did not have to worry about, luckily: constructors and non-function members. Our interfaces did not include constructors, all objects were constructed with factory functions 1. Similar for non-function members, these are never part of interfaces. For the future, constructors are probably reasonably easy to implement, and for members we can probably use the Python slots mechanism in a similar way to what PyObjC does. We did need one constructor per interface, so we could wrap Python objects in a C++ wrapper when passing it from Python to C++, but this was easy. The constructor got a Python object, did some rudimentary checking (the Python object needs to have attributes for all the needed C++ methods) and that was that. Now the only thing needed was to tell the Python to C++ bridge about the available wrappers and we were all done: transparent passing of C++ objects to Python and the reverse. There were a few minor issues here, such as trying to make sure we did not do double wrapping (if a C++ object is passed to Python it gets a Python wrapper around it, but when we pass it back to C++ we want to pass the original object, not that Python wrapper wrapped in another C++ wrapper). Results so far This is all very recent work, so we have not had a chance to exercise it thoroughly, but we have managed to create a non-player in Python. This non-player goes through all the motions of reading, parsing and scheduling a document, but in stead of actually displaying media it prints messages of the form at time hh:mm:ss I should have displayed image Given the architecture of the Ambulant Player this means that all sorts of things, including subclassing both ways, threading, locking, and garbage collection, probably work. We have also started to use the bridge to create a unit test suite for the Ambulant player. This is something we have sorely missed, but all C++ unit test frameworks appeared to be rather a lot of effort to deploy, so we are happy we can now use the Python unit test framework. Future work Some of the things that need to be done are sketched in the text, but one thing is conspicuously absent from this document, and really needs to be addressed: the weak points of bgen. As you will have guessed by now bgen is not without them, being so mature but so little-used:-) The main problem is that the learning curve for deploying it in a new project, especially for the first time, is very steep. While its power resides in the ability to extend it any which way by subclassing the various Type and Object and ObjectDefinition classes this is also its downside: without that subclassing there is very little it can do. Similar for the RE parser: very powerful once you get the hang of it but usually the default parser will not work for your problem at hand without serious tweaking. I have a number of ideas in this area, however. Actually, I have quite a large number of ideas, but I miss the accompanying amount of time. So let me end this paper with a cordial request to contact me if you feel like investing some of your spare time in bgen. References [1] [2] [3] [4] 1 In the Python to C++ bridge we did require the constructors, because the Python code may want to subclass specific C++ implementations of interfaces.
6 [5] [6] [7] [8]
Engineering the Ambulant Multimedia Player
Engineering the Ambulant Multimedia Player Jack Jansen SEN5 group CWI 1 Outline of the Talk What is Ambulant? Design Implementation Success stories Lessons learned 2 2 What is Ambulant?
Java (12 Weeks) Introduction to Java Programming Language
Java (12 Weeks) Topic Lecture No. Introduction to Java Programming Language 1 An Introduction to Java o Java as a Programming Platform, The Java "White Paper" Buzzwords, Java and the Internet, A Short
Java Application Developer Certificate Program Competencies
Java Application Developer Certificate Program Competencies After completing the following units, you will be able to: Basic Programming Logic Explain the steps involved in the program development cycle
The C Programming Language course syllabus associate level
TECHNOLOGIES The C Programming Language course syllabus associate level Course description The course fully covers the basics of programming in the C programming language and demonstrates fundamental programming
Java the UML Way: Integrating Object-Oriented Design and Programming
Java the UML Way: Integrating Object-Oriented Design and Programming by Else Lervik and Vegard B. Havdal ISBN 0-470-84386-1 John Wiley & Sons, Ltd. Table of Contents Preface xi 1 Introduction 1 1.1 Preliminaries
Python, C++ and SWIG
Robin Dunn Software Craftsman O Reilly Open Source Convention July 21 25, 2008 Slides available at http://wxpython.org/oscon2008/ Python & C++ Comparisons Each is a general purpose programming language,
KITES TECHNOLOGY COURSE MODULE (C, C++, DS)
KITES TECHNOLOGY 360 Degree Solution www.kitestechnology.com/academy.php [email protected] [email protected] Contact: - 8961334776 9433759247 9830639522.NET JAVA WEB DESIGN PHP SQL, PL/SQL
1.00 Lecture 1. Course information Course staff (TA, instructor names on syllabus/faq): 2 instructors, 4 TAs, 2 Lab TAs, graders
1.00 Lecture 1 Course Overview Introduction to Java Reading for next time: Big Java: 1.1-1.7 Course information Course staff (TA, instructor names on syllabus/faq): 2 instructors, 4 TAs, 2 Lab TAs, graders
Fundamentals of Java Programming
Fundamentals of Java Programming This document is exclusive property of Cisco Systems, Inc. Permission is granted to print and copy this document for non-commercial distribution and exclusive use by instructors
An Incomplete C++ Primer. University of Wyoming MA 5310
An Incomplete C++ Primer University of Wyoming MA 5310 Professor Craig C. Douglas http://www.mgnet.org/~douglas/classes/na-sc/notes/c++primer.pdf C++ is a legacy programming language, as is other languages
Getting Started with the Internet Communications Engine
Getting Started with the Internet Communications Engine David Vriezen April 7, 2014 Contents 1 Introduction 2 2 About Ice 2 2.1 Proxies................................. 2 3 Setting Up ICE 2 4 Slices 2
PROBLEM SOLVING SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON
PROBLEM SOLVING WITH SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON Addison Wesley Boston San Francisco New York London
Handout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner.
Handout 1 CS603 Object-Oriented Programming Fall 15 Page 1 of 11 Handout 1 Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner. Java
El Dorado Union High School District Educational Services
El Dorado Union High School District Course of Study Information Page Course Title: ACE Computer Programming II (#495) Rationale: A continuum of courses, including advanced classes in technology is needed.
Java Interview Questions and Answers
1. What is the most important feature of Java? Java is a platform independent language. 2. What do you mean by platform independence? Platform independence means that we can write and compile the java
C++ INTERVIEW QUESTIONS
C++ INTERVIEW QUESTIONS http://www.tutorialspoint.com/cplusplus/cpp_interview_questions.htm Copyright tutorialspoint.com Dear readers, these C++ Interview Questions have been designed specially to get
C++ Programming Language
C++ Programming Language Lecturer: Yuri Nefedov 7th and 8th semesters Lectures: 34 hours (7th semester); 32 hours (8th semester). Seminars: 34 hours (7th semester); 32 hours (8th semester). Course abstract
Course Name: ADVANCE COURSE IN SOFTWARE DEVELOPMENT (Specialization:.Net Technologies)
Course Name: ADVANCE COURSE IN SOFTWARE DEVELOPMENT (Specialization:.Net Technologies) Duration of Course: 6 Months Fees: Rs. 25,000/- (including Service Tax) Eligibility: B.E./B.Tech., M.Sc.(IT/ computer
MA-WA1920: Enterprise iphone and ipad Programming
MA-WA1920: Enterprise iphone and ipad Programming Description This 5 day iphone training course teaches application development for the ios platform. It covers iphone, ipad and ipod Touch devices. This
AppendixA1A1. Java Language Coding Guidelines. A1.1 Introduction
AppendixA1A1 Java Language Coding Guidelines A1.1 Introduction This coding style guide is a simplified version of one that has been used with good success both in industrial practice and for college courses.
University of Hull Department of Computer Science. Wrestling with Python Week 01 Playing with Python
Introduction Welcome to our Python sessions. University of Hull Department of Computer Science Wrestling with Python Week 01 Playing with Python Vsn. 1.0 Rob Miles 2013 Please follow the instructions carefully.
Syntax Check of Embedded SQL in C++ with Proto
Proceedings of the 8 th International Conference on Applied Informatics Eger, Hungary, January 27 30, 2010. Vol. 2. pp. 383 390. Syntax Check of Embedded SQL in C++ with Proto Zalán Szűgyi, Zoltán Porkoláb
Moving from CS 61A Scheme to CS 61B Java
Moving from CS 61A Scheme to CS 61B Java Introduction Java is an object-oriented language. This document describes some of the differences between object-oriented programming in Scheme (which we hope you
Informatica e Sistemi in Tempo Reale
Informatica e Sistemi in Tempo Reale Introduction to C programming Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa October 25, 2010 G. Lipari (Scuola Superiore Sant Anna)
Debugging Multi-threaded Applications in Windows
Debugging Multi-threaded Applications in Windows Abstract One of the most complex aspects of software development is the process of debugging. This process becomes especially challenging with the increased
Java 6 'th. Concepts INTERNATIONAL STUDENT VERSION. edition
Java 6 'th edition Concepts INTERNATIONAL STUDENT VERSION CONTENTS PREFACE vii SPECIAL FEATURES xxviii chapter i INTRODUCTION 1 1.1 What Is Programming? 2 J.2 The Anatomy of a Computer 3 1.3 Translating
Software documentation systems
Software documentation systems Basic introduction to various user-oriented and developer-oriented software documentation systems. Ondrej Holotnak Ondrej Jombik Software documentation systems: Basic introduction
Introduction to Python
Caltech/LEAD Summer 2012 Computer Science Lecture 2: July 10, 2012 Introduction to Python The Python shell Outline Python as a calculator Arithmetic expressions Operator precedence Variables and assignment
JAVA. EXAMPLES IN A NUTSHELL. O'REILLY 4 Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo. Third Edition.
"( JAVA. EXAMPLES IN A NUTSHELL Third Edition David Flanagan O'REILLY 4 Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo Table of Contents Preface xi Parti. Learning Java 1. Java Basics 3 Hello
USING RUST TO BUILD THE NEXT GENERATION WEB BROWSER
USING RUST TO BUILD THE NEXT GENERATION WEB BROWSER Lars Bergstrom Mozilla Research Mike Blumenkrantz Samsung R&D America Why a new web engine? Support new types of applications and new devices All modern
Object Oriented Software Design II
Object Oriented Software Design II Introduction to C++ Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa February 20, 2012 G. Lipari (Scuola Superiore Sant Anna) C++ Intro February
Storage Classes CS 110B - Rule Storage Classes Page 18-1 \handouts\storclas
CS 110B - Rule Storage Classes Page 18-1 Attributes are distinctive features of a variable. Data type, int or double for example, is an attribute. Storage class is another attribute. There are four storage
Glossary of Object Oriented Terms
Appendix E Glossary of Object Oriented Terms abstract class: A class primarily intended to define an instance, but can not be instantiated without additional methods. abstract data type: An abstraction
Java 7 Recipes. Freddy Guime. vk» (,\['«** g!p#« Carl Dea. Josh Juneau. John O'Conner
1 vk» Java 7 Recipes (,\['«** - < g!p#«josh Juneau Carl Dea Freddy Guime John O'Conner Contents J Contents at a Glance About the Authors About the Technical Reviewers Acknowledgments Introduction iv xvi
Computing Concepts with Java Essentials
2008 AGI-Information Management Consultants May be used for personal purporses only or by libraries associated to dandelon.com network. Computing Concepts with Java Essentials 3rd Edition Cay Horstmann
Java EE Web Development Course Program
Java EE Web Development Course Program Part I Introduction to Programming 1. Introduction to programming. Compilers, interpreters, virtual machines. Primitive types, variables, basic operators, expressions,
Embedded Programming in C/C++: Lesson-1: Programming Elements and Programming in C
Embedded Programming in C/C++: Lesson-1: Programming Elements and Programming in C 1 An essential part of any embedded system design Programming 2 Programming in Assembly or HLL Processor and memory-sensitive
Binary storage of graphs and related data
EÖTVÖS LORÁND UNIVERSITY Faculty of Informatics Department of Algorithms and their Applications Binary storage of graphs and related data BSc thesis Author: Frantisek Csajka full-time student Informatics
CSCE 110 Programming I Basics of Python: Variables, Expressions, and Input/Output
CSCE 110 Programming Basics of Python: Variables, Expressions, and nput/output Dr. Tiffani L. Williams Department of Computer Science and Engineering Texas A&M University Fall 2011 Python Python was developed
Programming Language Inter-conversion
Programming Language Inter-conversion Dony George Priyanka Girase Mahesh Gupta Prachi Gupta Aakanksha Sharma FCRIT, Vashi Navi Mumbai ABSTRACT In this paper, we have presented a new approach of programming
INTRODUCTION TO OBJECTIVE-C CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 12 09/29/2011
INTRODUCTION TO OBJECTIVE-C CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 12 09/29/2011 1 Goals of the Lecture Present an introduction to Objective-C 2.0 Coverage of the language will be INCOMPLETE
2! Multimedia Programming with! Python and SDL
2 Multimedia Programming with Python and SDL 2.1 Introduction to Python 2.2 SDL/Pygame: Multimedia/Game Frameworks for Python Literature: G. van Rossum and F. L. Drake, Jr., An Introduction to Python -
C Compiler Targeting the Java Virtual Machine
C Compiler Targeting the Java Virtual Machine Jack Pien Senior Honors Thesis (Advisor: Javed A. Aslam) Dartmouth College Computer Science Technical Report PCS-TR98-334 May 30, 1998 Abstract One of the
Software Testing. Definition: Testing is a process of executing a program with data, with the sole intention of finding errors in the program.
Software Testing Definition: Testing is a process of executing a program with data, with the sole intention of finding errors in the program. Testing can only reveal the presence of errors and not the
core. Volume I - Fundamentals Seventh Edition Sun Microsystems Press A Prentice Hall Title ULB Darmstadt
core. 2008 AGI-Information Management Consultants May be used for personal purporses only or by libraries associated to dandelon.com network. Volume I - Fundamentals Seventh Edition CAY S. HORSTMANN GARY
Chapter 3.2 C++, Java, and Scripting Languages. The major programming languages used in game development.
Chapter 3.2 C++, Java, and Scripting Languages The major programming languages used in game development. C++ C used to be the most popular language for games Today, C++ is the language of choice for game
CSE 237A Final Project Final Report
CSE 237A Final Project Final Report Multi-way video conferencing system over 802.11 wireless network Motivation Yanhua Mao and Shan Yan The latest technology trends in personal mobile computing are towards
Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science. Unit of Study / Textbook Correlation
Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science updated 03/08/2012 Unit 1: JKarel 8 weeks http://www.fcps.edu/is/pos/documents/hs/compsci.htm
Android Application Development Course Program
Android Application Development Course Program Part I Introduction to Programming 1. Introduction to programming. Compilers, interpreters, virtual machines. Primitive data types, variables, basic operators,
Using EDA Databases: Milkyway & OpenAccess
Using EDA Databases: Milkyway & OpenAccess Enabling and Using Scripting Languages with Milkyway and OpenAccess Don Amundson Khosro Khakzadi 2006 LSI Logic Corporation 1 Outline History Choice Of Scripting
.NET and J2EE Intro to Software Engineering
.NET and J2EE Intro to Software Engineering David Talby This Lecture.NET Platform The Framework CLR and C# J2EE Platform And Web Services Introduction to Software Engineering The Software Crisis Methodologies
Evolution of the Major Programming Languages
142 Evolution of the Major Programming Languages Object Oriented Programming: Smalltalk Object-Oriented: It s fundamental characteristics are: Data abstraction, Inheritance and Dynamic Binding. The essence
Semester Review. CSC 301, Fall 2015
Semester Review CSC 301, Fall 2015 Programming Language Classes There are many different programming language classes, but four classes or paradigms stand out:! Imperative Languages! assignment and iteration!
09336863931 : provid.ir
provid.ir 09336863931 : NET Architecture Core CSharp o Variable o Variable Scope o Type Inference o Namespaces o Preprocessor Directives Statements and Flow of Execution o If Statement o Switch Statement
MPLAB Harmony System Service Libraries Help
MPLAB Harmony System Service Libraries Help MPLAB Harmony Integrated Software Framework v1.08 All rights reserved. This section provides descriptions of the System Service libraries that are available
Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.
Name: Class: Date: Exam #1 - Prep True/False Indicate whether the statement is true or false. 1. Programming is the process of writing a computer program in a language that the computer can respond to
Coding conventions and C++-style
Chapter 1 Coding conventions and C++-style This document provides an overview of the general coding conventions that are used throughout oomph-lib. Knowledge of these conventions will greatly facilitate
Concrete uses of XML in software development and data analysis.
Concrete uses of XML in software development and data analysis. S. Patton LBNL, Berkeley, CA 94720, USA XML is now becoming an industry standard for data description and exchange. Despite this there are
Lab 2 : Basic File Server. Introduction
Lab 2 : Basic File Server Introduction In this lab, you will start your file system implementation by getting the following FUSE operations to work: CREATE/MKNOD, LOOKUP, and READDIR SETATTR, WRITE and
Curriculum Map. Discipline: Computer Science Course: C++
Curriculum Map Discipline: Computer Science Course: C++ August/September: How can computer programs make problem solving easier and more efficient? In what order does a computer execute the lines of code
JMulTi/JStatCom - A Data Analysis Toolkit for End-users and Developers
JMulTi/JStatCom - A Data Analysis Toolkit for End-users and Developers Technology White Paper JStatCom Engineering, www.jstatcom.com by Markus Krätzig, June 4, 2007 Abstract JStatCom is a software framework
UNIVERSITY OF MALTA THE MATRICULATION CERTIFICATE EXAMINATION ADVANCED LEVEL COMPUTING. May 2011
UNIVERSITY OF MALTA THE MATRICULATION CERTIFICATE EXAMINATION ADVANCED LEVEL COMPUTING May 2011 EXAMINERS REPORT MATRICULATION AND SECONDARY EDUCATION CERTIFICATE EXAMINATIONS BOARD AM Computing May 2011
An Overview of Java. overview-1
An Overview of Java overview-1 Contents What is Java Major Java features Java virtual machine Java programming language Java class libraries (API) GUI Support in Java Networking and Threads in Java overview-2
Chapter 6: Programming Languages
Chapter 6: Programming Languages Computer Science: An Overview Eleventh Edition by J. Glenn Brookshear Copyright 2012 Pearson Education, Inc. Chapter 6: Programming Languages 6.1 Historical Perspective
Static vs. Dynamic. Lecture 10: Static Semantics Overview 1. Typical Semantic Errors: Java, C++ Typical Tasks of the Semantic Analyzer
Lecture 10: Static Semantics Overview 1 Lexical analysis Produces tokens Detects & eliminates illegal tokens Parsing Produces trees Detects & eliminates ill-formed parse trees Static semantic analysis
3 Improving the Crab more sophisticated programming
3 Improving the Crab more sophisticated programming topics: concepts: random behavior, keyboard control, sound dot notation, random numbers, defining methods, comments In the previous chapter, we looked
OKLAHOMA SUBJECT AREA TESTS (OSAT )
CERTIFICATION EXAMINATIONS FOR OKLAHOMA EDUCATORS (CEOE ) OKLAHOMA SUBJECT AREA TESTS (OSAT ) FIELD 081: COMPUTER SCIENCE September 2008 Subarea Range of Competencies I. Computer Use in Educational Environments
LittleCMS: A free color management engine in 100K.
LittleCMS: A free color management engine in 100K. Background One of the main components of a color management solution is the Color Matching Module, or CMM, which is the software engine in charge of controlling
Japan Communication India Skill Development Center
Japan Communication India Skill Development Center Java Application System Developer Course Detail Track 2a Java Application Software Developer: Phase1 SQL Overview 70 Introduction Database, DB Server
Hypercosm. Studio. www.hypercosm.com
Hypercosm Studio www.hypercosm.com Hypercosm Studio Guide 3 Revision: November 2005 Copyright 2005 Hypercosm LLC All rights reserved. Hypercosm, OMAR, Hypercosm 3D Player, and Hypercosm Studio are trademarks
Variable Base Interface
Chapter 6 Variable Base Interface 6.1 Introduction Finite element codes has been changed a lot during the evolution of the Finite Element Method, In its early times, finite element applications were developed
3.5. cmsg Developer s Guide. Data Acquisition Group JEFFERSON LAB. Version
Version 3.5 JEFFERSON LAB Data Acquisition Group cmsg Developer s Guide J E F F E R S O N L A B D A T A A C Q U I S I T I O N G R O U P cmsg Developer s Guide Elliott Wolin [email protected] Carl Timmer [email protected]
[Refer Slide Time: 05:10]
Principles of Programming Languages Prof: S. Arun Kumar Department of Computer Science and Engineering Indian Institute of Technology Delhi Lecture no 7 Lecture Title: Syntactic Classes Welcome to lecture
Crash Course in Java
Crash Course in Java Based on notes from D. Hollinger Based in part on notes from J.J. Johns also: Java in a Nutshell Java Network Programming and Distributed Computing Netprog 2002 Java Intro 1 What is
C#5.0 IN A NUTSHELL. Joseph O'REILLY. Albahari and Ben Albahari. Fifth Edition. Tokyo. Sebastopol. Beijing. Cambridge. Koln.
Koln C#5.0 IN A NUTSHELL Fifth Edition Joseph Albahari and Ben Albahari O'REILLY Beijing Cambridge Farnham Sebastopol Tokyo Table of Contents Preface xi 1. Introducing C# and the.net Framework 1 Object
Programming Languages
Programming Languages Programming languages bridge the gap between people and machines; for that matter, they also bridge the gap among people who would like to share algorithms in a way that immediately
Computer Programming I
Computer Programming I COP 2210 Syllabus Spring Semester 2012 Instructor: Greg Shaw Office: ECS 313 (Engineering and Computer Science Bldg) Office Hours: Tuesday: 2:50 4:50, 7:45 8:30 Thursday: 2:50 4:50,
CS 111 Classes I 1. Software Organization View to this point:
CS 111 Classes I 1 Software Organization View to this point: Data Objects and primitive types Primitive types operators (+, /,,*, %). int, float, double, char, boolean Memory location holds the data Objects
Affdex SDK for Android. Developer Guide For SDK version 1.0
Affdex SDK for Android Developer Guide For SDK version 1.0 www.affdex.com/mobile-sdk 1 August 4, 2014 Introduction The Affdex SDK is the culmination of years of scientific research into emotion detection,
The Clean programming language. Group 25, Jingui Li, Daren Tuzi
The Clean programming language Group 25, Jingui Li, Daren Tuzi The Clean programming language Overview The Clean programming language first appeared in 1987 and is still being further developed. It was
RARITAN VALLEY COMMUNITY COLLEGE ACADEMIC COURSE OUTLINE. CISY 105 Foundations of Computer Science
I. Basic Course Information RARITAN VALLEY COMMUNITY COLLEGE ACADEMIC COURSE OUTLINE CISY 105 Foundations of Computer Science A. Course Number and Title: CISY-105, Foundations of Computer Science B. New
Jonathan Worthington Scarborough Linux User Group
Jonathan Worthington Scarborough Linux User Group Introduction What does a Virtual Machine do? Hides away the details of the hardware platform and operating system. Defines a common set of instructions.
Software Engineering Techniques
Software Engineering Techniques Low level design issues for programming-in-the-large. Software Quality Design by contract Pre- and post conditions Class invariants Ten do Ten do nots Another type of summary
JetBrains ReSharper 2.0 Overview Introduction ReSharper is undoubtedly the most intelligent add-in to Visual Studio.NET 2003 and 2005. It greatly increases the productivity of C# and ASP.NET developers,
CORBA Programming with TAOX11. The C++11 CORBA Implementation
CORBA Programming with TAOX11 The C++11 CORBA Implementation TAOX11: the CORBA Implementation by Remedy IT TAOX11 simplifies development of CORBA based applications IDL to C++11 language mapping is easy
Code Qualities and Coding Practices
Code Qualities and Coding Practices Practices to Achieve Quality Scott L. Bain and the Net Objectives Agile Practice 13 December 2007 Contents Overview... 3 The Code Quality Practices... 5 Write Tests
Charles Dierbach. Wiley
Charles Dierbach Wiley Contents Preface Acknowledgments About the Author XXI xxv xxvii Introduction 1 MOTIVATION 2 FUNDAMENTALS 2 1.1 What Is Computer Science? 2 1.1.1 The Essence of Computational Problem
SciTools Understand Flavor for Structure 101g
SciTools Understand Flavor for Structure 101g By Marcio Marchini ([email protected] ) 2014/10/10 1) WHAT IS THE UNDERSTAND FLAVOR FOR STRUCTURE101G? 1 2) WHY VARIOUS FLAVORS, AND NOT JUST ONE?
Code Refactoring and Defects
Code Refactoring and Defects Reusing this material This work is licensed under a Creative Commons Attribution- NonCommercial-ShareAlike 4.0 International License. http://creativecommons.org/licenses/by-nc-sa/4.0/deed.en_us
MICHIGAN TEST FOR TEACHER CERTIFICATION (MTTC) TEST OBJECTIVES FIELD 050: COMPUTER SCIENCE
MICHIGAN TEST FOR TEACHER CERTIFICATION (MTTC) TEST OBJECTIVES Subarea Educational Computing and Technology Literacy Computer Systems, Data, and Algorithms Program Design and Verification Programming Language
Firewall Builder Architecture Overview
Firewall Builder Architecture Overview Vadim Zaliva Vadim Kurland Abstract This document gives brief, high level overview of existing Firewall Builder architecture.
Logging in Java Applications
Logging in Java Applications Logging provides a way to capture information about the operation of an application. Once captured, the information can be used for many purposes, but it is particularly useful
How To Write A Program In Java (Programming) On A Microsoft Macbook Or Ipad (For Pc) Or Ipa (For Mac) (For Microsoft) (Programmer) (Or Mac) Or Macbook (For
Projet Java Responsables: Ocan Sankur, Guillaume Scerri (LSV, ENS Cachan) Objectives - Apprendre à programmer en Java - Travailler à plusieurs sur un gros projet qui a plusieurs aspects: graphisme, interface
Input Output. 9.1 Why an IO Module is Needed? Chapter 9
Chapter 9 Input Output In general most of the finite element applications have to communicate with pre and post processors,except in some special cases in which the application generates its own input.
COMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing
COMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing The scanner (or lexical analyzer) of a compiler processes the source program, recognizing
Specialized Android APP Development Program with Java (SAADPJ) Duration 2 months
Specialized Android APP Development Program with Java (SAADPJ) Duration 2 months Our program is a practical knowledge oriented program aimed at making innovative and attractive applications for mobile
TZWorks Windows Event Log Viewer (evtx_view) Users Guide
TZWorks Windows Event Log Viewer (evtx_view) Users Guide Abstract evtx_view is a standalone, GUI tool used to extract and parse Event Logs and display their internals. The tool allows one to export all
Extending Desktop Applications to the Web
Extending Desktop Applications to the Web Arno Puder San Francisco State University Computer Science Department 1600 Holloway Avenue San Francisco, CA 94132 [email protected] Abstract. Web applications have
Programming and Software Development CTAG Alignments
Programming and Software Development CTAG Alignments This document contains information about four Career-Technical Articulation Numbers (CTANs) for Programming and Software Development Career-Technical
