Just give it a try!

Just another WordPress.com weblog

E-Jo ( Electronic Journal) May 10, 2008

Filed under: Computer Science — heykell @ 5:58 pm
Tags: , ,

Electronic journal is a survivor for the ones who always forget bringing their journals with them, for the ones having problems with the concepts of design and UML styles, for the ones who need a mind map to thinking efficiently while brain-storming about problems or concepts of programming. e-Jo is not only for students but also for teachers and assistants. To observe the development process of students, to mark their works and to give feedback more efficiently; e-Jo is the right tool for you. The main functions of e-Jo are ease of design, quick access to previous records and guidance of students in the progress of programming. It’s coming soon…

I have been studying on this project for two months with in a group of 4 people. We are in implementation stage despite of the MayFest:) I have concentrated on the UML part. It is almost half done. Actually, details are a bit confusing and I have some difficulties with GUI. However, it is in process. The final demo will be ready at 25 May.

There is a very good guide which is prepared by Cay Horstmann from San Jose University. Violet is one of his works as a UML tool. I make use of his codes and I have modified it so as to be easier and more plain. It is not complicated as other tools ( ArgoUML, UMLet…). It is very user friendly, thanks to Cay Horstmann and GNU Public License.

 

Results of GSoC 2008 April 24, 2008

Filed under: Computer Science, GSoC — heykell @ 4:55 pm

The results were announced on Monday, however I am not accepted. Although I feel unhappy about this, everything is going on… I have just tried to participate and understand the community, I plan to apply next year again. May be the project selection was so complicated for a first year computer engineering student. Anyway, I am accepted for summer internship by Portakal Teknoloji. It is a very good chance to improve myself throughout the summer.

On the other hand, Our project is at Implementation Stage. We have divided the work to implement, but I have examinations :( What a busy life…

Edit after 1 Month : I have contacted with John Penix, from Java Path Finder team and ask why I was not accepted. After some mailing traffic, he told me that I was one of the possible ones to be selected. However, they give priority to the harder projects. One of my rival was a M. Sc student but his proposal was not good as mine ( as Jhon said) :) . Although I am not in, it is good to know that I was very near to be accepted.

 

GSoC 2008 Proposal for Ptolemy II April 21, 2008

Filed under: Computer Science, GSoC — heykell @ 5:03 pm
Tags: , , ,

I want to study on wireless networks which builds on the discrete event domain to support modeling of wireless and sensor network systems. In this area, channel models mediate communication between actors and the visual syntax does not require wiring between components that is the well-known property of wireless systems. One of the reasons I want to study this project is my interest in wireless systems that has an amazing impact on military and many public application such as environment and habitat monitoring, health care applications, traffic control and home automation. The important concerns about wireless systems are mobility when the sensors nodes and base stations are not stable, security and middleware, especially middleware focus on the design of middle-level primitives between the software and the hardware. In the Ptolemy project, modeling the wireless networks will contribute to testing the infrastructure and user interfaces of Ptides. It will also be an example of Ptides’ modeling.

Modeling & Design

As in the main design methodology of Ptolemy project; heterogeneous modeling, simulation, and design of concurrent systems will be used in this specific project. However, rather than designing
the wireless networks model from scratch, the more useful mechanism is to reuse existing models and then modify the required type of modeling.

Actor Oriented Design
Ptolemy II supports actor-oriented design which somehow contrasts (and complements) with object-oriented design by emphasizing concurrency and communication between components. Especially, one of the reasons I want to improve myself in discrete event systems is to learn the differences and drawbacks of each system. Although Java is an object-oriented language, the cooperation of it with actor-oriented design needs considerable attention. One of the developed characteristics of actor-oriented design is the abstraction of structure and modeling it without saying anything about how it works and organizes. Moreover, actor oriented programming can conveniently represent adaptive systems, systems with multiple operating modes, systems without fixed structure, and systems that control other systems. Ptolemy II is a Java-based design environment that supports the construction and execution of hierarchical, reconfigurable models using actors [1].

Code Generation

Ptolemy II has two approaches to code generation. In the first approach, the code generator Copernicus is used as a component specialization framework built on top of Java compiler toolkit called Shoot. It can be used to extend and reuse the core mechanism of Ptolemy II to generate a new model, especially wireless network model. The second approach has components as generators, but uses an architecture where the interfaces of components are defined exactly as in ordinary Ptolemy II actors, and “helpers” are used to generate code for particular targets.
As an existing example, VisualSense separates software applications that are built on Ptolemy II configurations and can be examined to gain a wider perspective [3].

Development Methodology

Research
Before starting the project, I must obtain enough background information about Ptolemy II project. Ptolemy II web page will be my primary database for research to begin with. I will also benefit from other’s research papers and documents.
Testing
In order to prevent software defects and possible bugs, all the components of the project will be tested using some methodologies. Jacl, which is a 100% Java implementation of Tcl that is used for testing Ptolemy II, will do testing. Each Java directory will contain a test subdirectory that contains Tcl files that use Jacl to test the project Java code [2].

Community Interaction
I will be in touch with other developers and researchers who are interested in wireless network modeling part of Ptolemy II. Process of development will take place fully in the open. All source code will be hosted on a web page, so users and interested developers will always have access to the latest version the of the code. I will also keep of track my development at my blog http://ezgicicek.wordpress.com/, and users will be able to leave comments about the code as it is being developed.

Schedule
I have developed a schedule to be stay on time and motivated.

April 14 – May 26 Requirements stage: Research process, which includes reading documentation, exploring Ptolemy II, collecting background information. Community interaction, meeting with mentors and other colleagues, brain storming and initial planning and designing.
May 26 – July 1 Midterm stage: Testing and coding process with weekly evaluations.
Midterm evaluation
July 10 – August 11 Coding Stage: Coding process continues with tests and documentation and weekly evaluations.
August 18 – September 1 Evaluations: Final evaluations include all process of development
September 3 Submission: Submitting code

Deliverables

- Model of wireless network system with the design and working code which includes:
detailed documentation and testing infrastructure
user interfaces of wireless network model

Personal Information & Motivation

I am a first year computer-engineering student at Bilkent University, in Turkey. I have been taking Java classes since the beginning of September and my GPA is 3.86 out of 4.00.In my Java course, I have been studying on a Java based educational project in a group of 4 people. Our project provides users with the range of facilities to improve the design skills in Java programming such as pseudo-code and UML structures. The project will be completed in the second week of May. The requirements and user interface stage of the project have already been completed. In this project, I gain experience with UML structures, Eclipse and GUI, which help me to improve my skills in Java. I have 2 years experience with Linux. My main operating system is Ubuntu, Gutsy Gibbon, before that I was using Pardus (OS developed by Turkish developers) and Kubuntu. I can allocate 3 or 4 hours until the end of May to Ptolemy II project. Then, my classes will end at 1 June and the time I can allocate will increase to 7-9 hours per day. Until the end of August, I can keep on working with this schedule. My interest on this topic can keep me happy and working so I do not think to give up after the formal process is ended. I suppose that there will be lots of things even after summer about this project. In the process of researching about Ptolemy II, I also feel that my expertise in this area has increased. I believe I am an excellent candidate to work on this project because I will be working in my spare time leading this project. I would really like to work on this project–not only because of my own passion towards free software and Java–but also to contribute back to the open source and Ptolemy II community.

References

1- Neuendorffer, Stephen, Actor-Oriented Metaprogramming, <http://ptolemy.eecs.berkeley.edu/publications/papers/04/StevesThesis/>
2- Testing Ptolemy II<http://ptolemy.eecs.berkeley.edu/ptolemyII/ptIIlatest/ptII/doc/coding/index.htm>
3- Faq Ptolemy II web page <http://ptolemy.eecs.berkeley.edu/ptolemyII/ptIIfaq.htm#CodeGen>

 

GSoC 2008 Proposal for Java Path Finder April 21, 2008

Filed under: Computer Science, GSoC — heykell @ 5:01 pm
Tags: , , ,

Name: Ezgi Çiçek

Project Title: Creating a set of JPF textbook examples

Education and Software Development Experience & experience with Java and object-oriented design patterns:

I am a first year computer-engineering student at Bilkent University in Turkey. I have been taking Java classes since the beginning of September and my GPA is 3.86 out of 4.00.In my Java course, I have been studying a Java based educational project in a group of 4 people. Our project provides users with the range of facilities to improve the design skills in Java programming such as pseudo-code and UML structures. The project will be completed in the second week of May. The requirements and user interface stage of the project have already been completed. In this project, I have gained experience with UML structures, Eclipse and GUI, which help me to improve my skills in Java. I have 2 years experience with Linux. My main operating system is Ubuntu, Gutsy Gibbon, and before that I was using Pardus (OS developed by Turkish developers) and Kubuntu. I can allocate 3 or 4 hours in a day until the end of May to JPF project. On June 1, my classes will end and the time I can allocate will increase to 7-9 hours per day. Until the end of August, I can continue working with this schedule. My interest on this topic can keep me happy and working so I do not think to give up after the formal process is ended. I hope that even after the summer, my work on this project may continue. In the process of researching about Java Path Finder, I also feel that my expertise in this area has increased. I believe I am an excellent candidate to work on this project because I will be working in my spare time leading this project. I would really like to work on this project — not only because of my own passion towards free software and Java — but also to contribute back to the open source and Java Path Finder community.

Why I’m interested in working on Java PathFinder: This part is integrated to other parts of proposal.

Have you contacted anyone on the JPF Team about this proposal: I have contacted with John Penix and Peter C. Mehlitz about the book I select for this project and the details of proposed projects. Their recommendation was very helpful for me.

Experience or knowledge of software testing and verification tools: I have installed JPF and started to test with it. I have also used JUnit for my Java project.

Project Details:

Background & Synopsis ( Abstract Part)

The best code developers are typically users first. As a curious user, in my project, I will apply to verification techniques by collecting different programs from Java textbooks and then I will add some bugs to show how Java Path Finder finds bugs. Java Path Finder is an explicit state model checker for Java byte code, whose focus is on finding bugs in Java programs. The main goal of JPF is to prevent modeling effort or at least use a real programming language for complex models. It can be used for closed systems but not for platform specific native Java code. The current version of JPF has its own JVM and garbage collector. So, the aim in this project is to indicate that formal methods of verification and testing are applicable to everyday software. Java gives the capability for anyone to write concurrent programs, so the need for a model checker will be inevitable in the future. I want to participate in this project to demonstrate the skills of JPF on verification and how JPF is an advantageous model checker for Java. It will also contribute to my learning process and understanding of Java and how JPF works.

Studying programming languages results in some challenges that will drive research in a new direction as the necessity of analysis of programs written in modern programming languages grows. JPF addresses this necessity by developing verification and testing environment for Java, especially with multi threaded and interactive programs where unpredictable interleaving can cause errors. The multi-threading and object-oriented features of Java make it a suitable verification environment. Moreover, Java is compiled into byte code and the analysis can be done at byte code level, which implies that the platform independent feature of Java can be applicable in the use of JPF, and any language translated into byte code can be used with JPF. Although someone can claim that most of the errors are caused by design faults, programs often contain fatal errors such as deadlocks and critical section violations despite the existence of complete designs [1].

Development Methodology

While selecting a program to analyze, I will be aware of some potential drawbacks and advantages. Although JPF can analyze any program written in pure Java, there are some exceptions such as the java.net library and partitions of java.io library. When a Java program calls methods that have no corresponding byte codes, access to a file system, communicate over a network, or contain GUI code, the program can not be analyzed easily. It can be handled by writing wrapper classes or modifications. Moreover, I will select programs with multi-threading properties for efficient testing. As a result, selected programs should have distinct characteristics that will contribute to the range of JPF examples.

Unlike other tools, JPF will output the entire flow of events that leads to a bad state. It helps identifications of deadlocks and other common but difficult to identify concurrency errors. JPF examines all combinations of paths / interleaving to account for the non-deterministic nature of the program. In the analysis of selected programs, the important thing is to indicate how JPF finds the error or bug and the scalability of it. All the verification results will be explained in detail to indicate the roots of verification and how JPF found defects.

Research

Before starting the project, I must obtain enough background information about Java Path. The JPF web page will be my primary database for research to begin with. I will also benefit from the research papers and documents of others. After I get detailed information about JPF and its usage, I will start to focus on the textbooks. I think code examples of the textbook “Multithreaded Programming with Java Technology”, by Bil Lewis and Daniel Berg can be very beneficial. The textbook covers typical threading topics like synchronization, deadlocks, and race conditions. Lewis and Berg even cover thread issues with RMI and optimization techniques to improve performance. In addition, “Concurrent Programming in Java”, by Doug Lea that explores proper design of multithreaded programs looks as a considerable resource for examples. However, I want to evaluate several textbooks to obtain different kinds of programs.

Testing

In order to check how JPF find defects and possible bugs, all the collected programs will be evaluated and some bugs will be added to indicate the process of verification. Various programs will be evaluated to demonstrate the verification mechanism of the JPF for deadlocks and unhandled exceptions. Moreover,I can provide my own property classes, or write listener-extensions to implement other property checks. In JPF, the test system is placed in a separate test directory tree. There are several methods to test a program such as explicitly invoking JUnit tests and directly running JPF without Junit, or running on a normal JVM and so on. However, the preferred testing mechanism is to support various levels of inspection and debugging in order to detect all bugs and defects.

Documentation

Results of tests and verifications, methods of debugging and process of testing will be documented as in the JPF documenting format. All the comments will be in java-doc format unless the otherwise is stated. Additional bugs intentionally included into the program will be specified in terms of state and properties. There can be comparison tests to demonstrate the differences between other debuggers and how JPF finds bugs. The results of these studies will be documented as well. Initially, the expository information about selected programs will be given to demonstrate the previous and modified state of the program.

Community Interaction

I will be in touch with other developers and researchers who are interested in verification and testing part of Java Path Finder. The process of development will take place fully in the open. All collected data will be hosted on a web page, so users and interested developers will always have access to the latest version of the collection. I will also keep track of my development at my blog http://ezgicicek.wordpress.com/ and everybody will be able to leave comments about the code as it is being developed.

Open Source

When the JPF project has been an open source project, It enabled other people to improve the Path Finder software. It is a very good development as a leverage the open-source community. It also contribute to finding defects in JPF and It will fasten the process of development. As a Google Summer of Code organization, the JPF project has also proved that the power of collaboration has an important impact on the development of it.

Schedule

I have developed a schedule to stay focused and motivated.

April 14 – May 26 Requirements stage: Research process, which includes reading documentation, exploring Java Path Finder, collecting background information. Community interaction, meeting with mentors and other colleagues, brain storming and initial planning and designing.

May 26 – July 10 Midterm stage: Testing and adding bugs process with weekly evaluations.Midterm evaluation

July 10 – August 11 Development Stage: Verification process continues with tests and documentation and weekly evaluations.

August 18 – September 1 Evaluations: Final evaluations include all process of development

September 3 Submission: Submitting code

Deliverables: The main goal of project is creating a collection of JPF examples to demonstrate how JPF find bugs, so as I explained before collection of tested Java programs with specific documentation and analysis of verification will be the product of this project.

References and links :

References

1- “Model Checking Programs” ( 2002) Willem Visser, Moffet Field,Klaus Havelund, Guillaume Brat ,SeungJoon Park and Flavio Lerda

2- Java Path Finder web site < http://javapathfinder.sourceforge.net/>

Links :

My web-blog : http://ezgicicek.wordpress.com/

Actually, I have a web-page for my Java project but it is not public at Moodle < http://moodle.org/>. It will be published after the project completed.

 

Dining Philosophers Problem April 6, 2008

Filed under: Computer Science — heykell @ 7:59 pm
Tags: ,

While I was looking at the JPF examples, I have found a well known problem in concurrency. It was firstly propounded by Edsger Wybe Dijkstra as a problem where five computers competed for access to five shared tape drive peripherals. Later on, the problem was narrated by Tony Hoare as the dining philosophers problem.

There is a group of philosopheillustrationrs ( usually 5 and greater than 2) who eat together at a round table. There are forks placed between the philosophers. Philosophers spend their time either thinking or eating. In order to eat, a philosopher must pick up exactly two forks, one on his immediate left, and the other on his immediate right. When he is done eating, he will put his forks down so that his neighbors may use them, and he thinks again.

The challenge in the dining philosophers problem is to design a method so that the philosophers do not deadlock (i.e. every philosopher has a fork), and so that no philosopher starves (i.e. when a philosopher is hungry, he/she eventually gets the forks). Additionally, the method should try to be as efficient as possible — in other words, the solution should try to minimize the time that philosophers spent waiting to eat.

Now how do we represent these into multi-threading?

Philosophers = Threads
Food = Resources
Forks = Semaphore/Locks

For the ones who do not know what semaphore is : Semaphore is basically a permit or a key to access the resources ( of course in computer science). Look here for another meaning of it.

There are several answers for this problem.