Doppl development   iteration #3
Upcoming SlideShare
Loading in...5
×
 

Doppl development iteration #3

on

  • 101 views

Doppl is a new programming language that aims providing a natural syntax for implementing parallel algorithms, designing data structures for shared memory applications and automated message passing ...

Doppl is a new programming language that aims providing a natural syntax for implementing parallel algorithms, designing data structures for shared memory applications and automated message passing among multiple tasks. The name is an abbreviation of `data oriented parallel programming language`.

Statistics

Views

Total Views
101
Views on SlideShare
101
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Doppl development   iteration #3 Doppl development iteration #3 Document Transcript

  • DOPPL Data Oriented Parallel Programming Language Development Diary Iteration #3 Covered Concepts: Access Modifiers, Assignment Operator Diego PERINI Department of Computer Engineering Istanbul Technical University, Turkey 2013-07-20 1
  • Abstract This paper stands for Doppl language development iteration #3. In this paper, shared data members and using assignment operator to access/copy those bindings will be introduced. An example task group with 2 cloned tasks is used as an example program. 1. Rationale Doppl tasks can make use of different kind of access modifiers to store its members. Previous iteration introduced an implied one, called a private data. Private datas are copied blocks of memory and their values may differ between tasks of the same task group. It is possible to mark a member as non-private via access modifiers. Language operators behave differently to non-private members. This iteration will only introduce shared members and assignment operation of a shared member for each kind of possible scenario. 2. Shared Members To declare a member as shared, a simple shared prefix is sufficient. Shared members only allocate one block of memory per task group and any task can change the value. Accessing a shared member is intrinsically mutually exclusive. No extra atomic operations are required to read and write to a shared member. Below is a sample task group of 2 tasks which share a single member. #An example task group of 2 tasks task(2) SharingMembers { data a_private_string = string shared data a_shared_string = string #Examples init: { a_private_string = "I am private!" a_shared_string = "I am shared!" } } 3. Assignment Operator and Standard Output Assigning values to shared member and outputting values of such members rise some ambiguities possible to be reason of common mistakes. Each ambiguity scenario is explained below in detail. #An example task group of 2 tasks task(2) SharingMembers { 2
  • data private_ = byte shared data shared_ = byte ... } Assuming Task_A and Task_B of same task group (SharingMembers) have their corresponding members allocated: ● private_ = any_value #Executed on Task_A It is a simple block copy operation. Each member have its own unique memory position and therefore can have different values on runtime. Only private_ of Task_A is affected. ● shared_ = any_value #Executed on Task_A shared_ = any_value #Executed on Task_B Both mean the exact same thing, a block copy to the shared memory location is conducted. It is therefore considered as common practice to pick reasonable names for shared members to prevent ambiguities. Printing member values to standard output needs extra care since each task may have different private member values. In order to conduct a synchronized and maintained output operation, a new kind of messaging mechanism will be introduced in the future. Assigning one type of value to another member type is forbidden in Doppl, thus the following source code is not valid. Conversion rules which are subjects of another iteration will be introduced to fill the necessity of typecasting. data an_int = int data a_float = float init: { an_int = a_float #Invalid assignment } 4. Conclusion Iteration #3 introduces shared task members and explains how they are allocated in the memory. Benefits and risks of using assignment operator between different kind of members is explained. 3
  • 5. Future Concepts Below are the concepts that are likely to be introduced in next iterations. ● ● ● ● ● ● ● ● ● ● ● ● ● A boolean type Arithmetic, relational, boolean and binary operators String Concatenation Standard input and output if conditional and trueness State transition operators Primitive collections and basic collection operators Provision operators Tasks as members Task and data traits Custom data types and defining traits Built-in traits for primitive data types Message passing 6. License CC BY-SA 3.0 http://creativecommons.org/licenses/by-sa/3.0/ 4