SlideShare uma empresa Scribd logo
1 de 4
Baixar para ler offline
DOPPL
Data Oriented Parallel Programming Language

Development Diary
Iteration #2

Covered Concepts:
Literals, Primitive Data Types, Task Members

Diego PERINI
Department of Computer Engineering
Istanbul Technical University, Turkey
2013-07-11

1
Abstract
This paper stands for Doppl language development iteration #2. In this paper, literals, primitive
data types and task members will be introduced. An example program running only one thread of a task
type for code explanations is prefered for simplicity.

1. Rationale
Doppl ecosystem enforces the programmer to declare variables via only member attributes. There
is no temporary variables as such mechanism do also imply temporary task initiations which can be done
via new task declarations. Task members are statically typed and error checked during compile time.
Initialization of these members can be done during init state of a task if required. This iteration will only
introduce member initialization via literals.

2. Primitive Data Types, Task Members and Basic Literals
Each task member is defined and initialized by the template below. Italic sections are user defined
names, bold names are primitive types and literals are highlighted.
#This is an example task with members of primitive types
task(1) Types {
data a_byte = byte
data an_integer = int
data a_string = string
data a_float = float
#Construction
init: {
a_byte =
a_byte =
a_byte =
a_byte =
a_byte =
a_byte =

127
0x7f
0x7F
0o177
0b01111111
'a'

an_integer
an_integer
an_integer
an_integer
an_integer

=
=
=
=
=

#decimal
#same as
#same as
#same as
#same as
#decimal

1234
0x1234
0o1234
0b10101
-1234

a_float = 0.23
a_float = -0.23
a_float = .23

127
decimal
decimal
decimal
decimal
97

127,
127,
127,
127,

hex form
hex form
octal form
binary form

#decimal 1234
#not same as decimal 1234
#not same as decimal and hex 1234
#a completely different number
#decimal -1234

#a regular float
#a negative float
#zero can be omitted

2
a_float
a_float
a_float
a_float
a_float

=
=
=
=
=

-.23
1.23456
-1.23456
1
-1

#negative zero can be omitted
#a regular non-zero float
#a negative non-zero float
#trailing zeros can be omitted
#same as above

a_string = "My name is Johnn" #a string with an endline
}
}

Member initialization is quite easy and self explanatory. They start with an optional access
modifier (different from regular object oriented languages) followed by an entity type which is in this
case the keyword data. A binding name is given followed by an equals sign and a type. A member
declaration can be read as "A data named a_byte is a byte". However, there are some constraints that need
to be noted before usage.
Bytes are 8 bit values and can only contain unsigned numbers between 0 and 255. Any value
beyond 255 is prone to errors due to bit overflow, least significant 8 bits are prefered in such cases. Any
value below 0 is converted from 2's complement representation to satisfy border constraints and least
significant 8 bits are prefered after conversion for large values.
Integers are signed 32 bit values with a range of -2147483648 to 2147483647 represented in
2's complement method internally. Unsigned representations will be introduced in the next iterations. '-'
(negative sign, dash) character whenever used as a prefix (without any whitespaces) converts any numeric
literal into its negative form automatically.
Floats are signed 32 bit values with an approximate range of ±3.4x10±7. Initialization with
exponents notation will be supported later. Unsigned representations will be introduced in the next
iterations.
Strings are primitives types as well and must not be confused with byte arrays. Strings are types
that has their own kind of operations and initialized by enclosed double quotes. Collection types such as
arrays and lists are subject to another iteration. Conversion methods for strings into these structures will
be introduced later. There is no character type defined in Doppl.

3. Special Literals
Null: Any kind of variable without initialization assigned the value of Null (case sensitive).
Null does not correspond to any numeric and string value, it has its own properties and handled with care
internally. Assigning a member with another uninitialized member is not an error and results in Null.
"": Empty string

3
Below are escape sequences for special characters and can be used in both string and byte
initializations. To initialize a byte with a character, use single commas to enclose the character.

my_byte = 'f'

char

meaning

n

newline

r

carriage return

t

tab

"

double quote (")



backslash ()

4. Conclusion
Iteration #2 introduces task members and some primitive types to play with. Properties of these
types and how they are initialized via literals are also explained in this iteration. Null, empty string and
special characters are introduced.

5. Future Concepts
Below are the concepts that are likely to be introduced in next iterations.
●
●
●
●
●
●
●
●

Shared members and more access modifiers
Assignment operator (more)
Arithmetic, relational and binary operators
State transition operators
A boolean type and trueness
if conditional
Collections
Provision operators

6. License
CC BY-SA 3.0
http://creativecommons.org/licenses/by-sa/3.0/

4

Mais conteúdo relacionado

Mais procurados

Friends function and_classes
Friends function and_classesFriends function and_classes
Friends function and_classes
asadsardar
 

Mais procurados (20)

Java Datatypes
Java DatatypesJava Datatypes
Java Datatypes
 
C# lecture 2: Literals , Variables and Data Types in C#
C# lecture 2: Literals , Variables and Data Types in C#C# lecture 2: Literals , Variables and Data Types in C#
C# lecture 2: Literals , Variables and Data Types in C#
 
Chapter 01 Introduction to Java by Tushar B Kute
Chapter 01 Introduction to Java by Tushar B KuteChapter 01 Introduction to Java by Tushar B Kute
Chapter 01 Introduction to Java by Tushar B Kute
 
OOP interview questions & answers.
OOP interview questions & answers.OOP interview questions & answers.
OOP interview questions & answers.
 
Csharp4 basics
Csharp4 basicsCsharp4 basics
Csharp4 basics
 
Object oriented programming interview questions
Object oriented programming interview questionsObject oriented programming interview questions
Object oriented programming interview questions
 
c# keywords, identifiers and Naming Conventions
c# keywords, identifiers and Naming Conventionsc# keywords, identifiers and Naming Conventions
c# keywords, identifiers and Naming Conventions
 
2- Introduction to java II
2-  Introduction to java II2-  Introduction to java II
2- Introduction to java II
 
Friend function & friend class
Friend function & friend classFriend function & friend class
Friend function & friend class
 
Concepts of core java
Concepts of core javaConcepts of core java
Concepts of core java
 
Friends function and_classes
Friends function and_classesFriends function and_classes
Friends function and_classes
 
datatypes_variables_constants
datatypes_variables_constantsdatatypes_variables_constants
datatypes_variables_constants
 
Ocl
OclOcl
Ocl
 
javainterface
javainterfacejavainterface
javainterface
 
Data types
Data typesData types
Data types
 
C# Basics
C# BasicsC# Basics
C# Basics
 
5- Overriding and Abstraction In Java
5- Overriding and Abstraction In Java5- Overriding and Abstraction In Java
5- Overriding and Abstraction In Java
 
Doppl development iteration #3
Doppl development   iteration #3Doppl development   iteration #3
Doppl development iteration #3
 
Learn C# Programming - Data Types & Type Conversion
Learn C# Programming - Data Types & Type ConversionLearn C# Programming - Data Types & Type Conversion
Learn C# Programming - Data Types & Type Conversion
 
Core Java Programming Language (JSE) : Chapter III - Identifiers, Keywords, ...
Core Java Programming Language (JSE) : Chapter III -  Identifiers, Keywords, ...Core Java Programming Language (JSE) : Chapter III -  Identifiers, Keywords, ...
Core Java Programming Language (JSE) : Chapter III - Identifiers, Keywords, ...
 

Destaque (6)

Historias do Asorey (Semanas da Ciencia)
Historias do Asorey (Semanas da Ciencia)Historias do Asorey (Semanas da Ciencia)
Historias do Asorey (Semanas da Ciencia)
 
Disclosure profile
Disclosure profileDisclosure profile
Disclosure profile
 
عيش حياتك-محمد الصاوى
 عيش حياتك-محمد الصاوى عيش حياتك-محمد الصاوى
عيش حياتك-محمد الصاوى
 
Bolu pegasus ucuz uçak bileti telefon
Bolu pegasus ucuz  uçak bileti telefonBolu pegasus ucuz  uçak bileti telefon
Bolu pegasus ucuz uçak bileti telefon
 
Web1012 slide 2
Web1012   slide 2Web1012   slide 2
Web1012 slide 2
 
Doppl Development Introduction
Doppl Development IntroductionDoppl Development Introduction
Doppl Development Introduction
 

Semelhante a Doppl development iteration #2

Data Type is a basic classification which identifies.docx
Data Type is a basic classification which identifies.docxData Type is a basic classification which identifies.docx
Data Type is a basic classification which identifies.docx
theodorelove43763
 

Semelhante a Doppl development iteration #2 (20)

Basic
BasicBasic
Basic
 
Python unit 1 (1).pptx
Python unit 1 (1).pptxPython unit 1 (1).pptx
Python unit 1 (1).pptx
 
Python_Unit_1.pdf
Python_Unit_1.pdfPython_Unit_1.pdf
Python_Unit_1.pdf
 
C reference manual
C reference manualC reference manual
C reference manual
 
Doppl development iteration #1
Doppl development   iteration #1Doppl development   iteration #1
Doppl development iteration #1
 
Data Types, Variables, and Operators
Data Types, Variables, and OperatorsData Types, Variables, and Operators
Data Types, Variables, and Operators
 
basics dart.pdf
basics dart.pdfbasics dart.pdf
basics dart.pdf
 
Java Basics
Java BasicsJava Basics
Java Basics
 
Sv data types and sv interface usage in uvm
Sv data types and sv interface usage in uvmSv data types and sv interface usage in uvm
Sv data types and sv interface usage in uvm
 
python presentation.pptx
python presentation.pptxpython presentation.pptx
python presentation.pptx
 
Data types
Data typesData types
Data types
 
Data Type is a basic classification which identifies.docx
Data Type is a basic classification which identifies.docxData Type is a basic classification which identifies.docx
Data Type is a basic classification which identifies.docx
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
 
Java Tokens
Java  TokensJava  Tokens
Java Tokens
 
Java - Basic Datatypes.pptx
Java - Basic Datatypes.pptxJava - Basic Datatypes.pptx
Java - Basic Datatypes.pptx
 
2 programming with c# i
2 programming with c# i2 programming with c# i
2 programming with c# i
 
C++ data types
C++ data typesC++ data types
C++ data types
 
Literals, primitive datatypes, variables, expressions, identifiers
Literals, primitive datatypes, variables, expressions, identifiersLiterals, primitive datatypes, variables, expressions, identifiers
Literals, primitive datatypes, variables, expressions, identifiers
 
3 Datatypes
3 Datatypes3 Datatypes
3 Datatypes
 
Improve Your Edge on Machine Learning - Day 1.pptx
Improve Your Edge on Machine Learning - Day 1.pptxImprove Your Edge on Machine Learning - Day 1.pptx
Improve Your Edge on Machine Learning - Day 1.pptx
 

Mais de Diego Perini

Mais de Diego Perini (6)

Doppl development iteration #10
Doppl development   iteration #10Doppl development   iteration #10
Doppl development iteration #10
 
Doppl development iteration #8
Doppl development   iteration #8Doppl development   iteration #8
Doppl development iteration #8
 
Doppl development iteration #6
Doppl development   iteration #6Doppl development   iteration #6
Doppl development iteration #6
 
Doppl development iteration #5
Doppl development   iteration #5Doppl development   iteration #5
Doppl development iteration #5
 
Doppl development iteration #4
Doppl development   iteration #4Doppl development   iteration #4
Doppl development iteration #4
 
Doppl development iteration #9
Doppl development   iteration #9Doppl development   iteration #9
Doppl development iteration #9
 

Último

Último (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Doppl development iteration #2

  • 1. DOPPL Data Oriented Parallel Programming Language Development Diary Iteration #2 Covered Concepts: Literals, Primitive Data Types, Task Members Diego PERINI Department of Computer Engineering Istanbul Technical University, Turkey 2013-07-11 1
  • 2. Abstract This paper stands for Doppl language development iteration #2. In this paper, literals, primitive data types and task members will be introduced. An example program running only one thread of a task type for code explanations is prefered for simplicity. 1. Rationale Doppl ecosystem enforces the programmer to declare variables via only member attributes. There is no temporary variables as such mechanism do also imply temporary task initiations which can be done via new task declarations. Task members are statically typed and error checked during compile time. Initialization of these members can be done during init state of a task if required. This iteration will only introduce member initialization via literals. 2. Primitive Data Types, Task Members and Basic Literals Each task member is defined and initialized by the template below. Italic sections are user defined names, bold names are primitive types and literals are highlighted. #This is an example task with members of primitive types task(1) Types { data a_byte = byte data an_integer = int data a_string = string data a_float = float #Construction init: { a_byte = a_byte = a_byte = a_byte = a_byte = a_byte = 127 0x7f 0x7F 0o177 0b01111111 'a' an_integer an_integer an_integer an_integer an_integer = = = = = #decimal #same as #same as #same as #same as #decimal 1234 0x1234 0o1234 0b10101 -1234 a_float = 0.23 a_float = -0.23 a_float = .23 127 decimal decimal decimal decimal 97 127, 127, 127, 127, hex form hex form octal form binary form #decimal 1234 #not same as decimal 1234 #not same as decimal and hex 1234 #a completely different number #decimal -1234 #a regular float #a negative float #zero can be omitted 2
  • 3. a_float a_float a_float a_float a_float = = = = = -.23 1.23456 -1.23456 1 -1 #negative zero can be omitted #a regular non-zero float #a negative non-zero float #trailing zeros can be omitted #same as above a_string = "My name is Johnn" #a string with an endline } } Member initialization is quite easy and self explanatory. They start with an optional access modifier (different from regular object oriented languages) followed by an entity type which is in this case the keyword data. A binding name is given followed by an equals sign and a type. A member declaration can be read as "A data named a_byte is a byte". However, there are some constraints that need to be noted before usage. Bytes are 8 bit values and can only contain unsigned numbers between 0 and 255. Any value beyond 255 is prone to errors due to bit overflow, least significant 8 bits are prefered in such cases. Any value below 0 is converted from 2's complement representation to satisfy border constraints and least significant 8 bits are prefered after conversion for large values. Integers are signed 32 bit values with a range of -2147483648 to 2147483647 represented in 2's complement method internally. Unsigned representations will be introduced in the next iterations. '-' (negative sign, dash) character whenever used as a prefix (without any whitespaces) converts any numeric literal into its negative form automatically. Floats are signed 32 bit values with an approximate range of ±3.4x10±7. Initialization with exponents notation will be supported later. Unsigned representations will be introduced in the next iterations. Strings are primitives types as well and must not be confused with byte arrays. Strings are types that has their own kind of operations and initialized by enclosed double quotes. Collection types such as arrays and lists are subject to another iteration. Conversion methods for strings into these structures will be introduced later. There is no character type defined in Doppl. 3. Special Literals Null: Any kind of variable without initialization assigned the value of Null (case sensitive). Null does not correspond to any numeric and string value, it has its own properties and handled with care internally. Assigning a member with another uninitialized member is not an error and results in Null. "": Empty string 3
  • 4. Below are escape sequences for special characters and can be used in both string and byte initializations. To initialize a byte with a character, use single commas to enclose the character. my_byte = 'f' char meaning n newline r carriage return t tab " double quote (") backslash () 4. Conclusion Iteration #2 introduces task members and some primitive types to play with. Properties of these types and how they are initialized via literals are also explained in this iteration. Null, empty string and special characters are introduced. 5. Future Concepts Below are the concepts that are likely to be introduced in next iterations. ● ● ● ● ● ● ● ● Shared members and more access modifiers Assignment operator (more) Arithmetic, relational and binary operators State transition operators A boolean type and trueness if conditional Collections Provision operators 6. License CC BY-SA 3.0 http://creativecommons.org/licenses/by-sa/3.0/ 4