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

Development Diary
Iteration #5

Covered Concepts:
Arithmetic, Relational and Binary Operators

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

1
Abstract
This paper stands for Doppl language development iteration #5. In this paper, basic operators
to execute arithmetics, relations and binary operations (i.e shifting, bitwise logic) will be introduced.
Previously introduced data types is used in the example source code.

1. Rationale
As a high level language, Doppl uses arithmetic, relational and binary operators to compute low
level calculations. These operators look nearly same with their other counterparts with a few exceptions.
Each exception is explained in detail.

2. Arithmetic Operators
To start with, Doppl makes use of six arithmetic operators to work with integers, floats and bytes.

keyword

meaning

+

addition

-

subtraction

*

multiplication

//

division with integer/byte result (floored)

/

division with float result

%

modulo

+, -, *, % operators can operate on any pair of the same type and generate a result of the same
type.
// division operator on the other hand do only work on integers or bytes and generate a result of
the same type. If the value generated cannot be represented as an integer, the value is floored.
/ operator always returns a float.
% operator only works with integers and bytes.

#Arithmetic operations
task(1) Arithmetics {
data a_byte = byte

2
data an_int = int
data a_float = float
data another_int = int #will not be initialized
#Examples
init: {
a_byte = 12 + 13
a_byte = 12 - 13
an_int = 12 * 13
an_int = 25 // 2
a_float = 25 / 2
an_int = 13 % 12

#25
#-1 which is converted into 0xFF
#156
#12 floored from 12.5
#12.5
#1

#Below are invalid
a_float = 25 // 2 #Calculation returns int or byte
an_int = 12.0 + 13.0 #Type mismatch, see operator info
an_int = a_float + a_byte #Type mismatch, see operator info
an_int = another_int + 1 #Null data, value mismatch
}
}

3. Relational Operators
Relational operators are special expressions that generate bool results that can be used to
initialize boolean members as well as conditionally branch in a task (will be introduced later).

keyword

meaning

<

less than

>

greater than

==

equals

!=

not equal

<=

less than or equal

>=

greater than or equal

Implicit conversions are not allowed and each of these operators can only work with same type of
parameters. Non-integral (i.e string) type behavior is not defined.

3
#Relational operations
task(1) Relations {
data a_bool = bool
#Examples
init: {
a_bool
a_bool
a_bool
a_bool
a_bool
a_bool

=
=
=
=
=
=

2 < 3
2.5 > 0
1 == 1
1 != 1
15 >= 15
15 <= 14

#True
#True
#True
#False
#True
#False

a_bool = 1 == 1.0 #error, type mismatch
}
}

4. Binary Operators
Binary operators are used to manipulate specific bits of values injectively. Below are the binary
operators ordered by their precedence descendingly.

keyword

meaning

&

and

|

or

^

xor

!

prefix not

Like arithmetic operators, binary operators can only work on integral types. Unlike previously
introduced operators, cross type usage is considered undefined behavior and should be avoided.
#Binary operations
task(1) Binary {
data an_int = int
data a_byte = byte
#Examples
init: {

4
an_int
an_int
a_byte
a_byte

=
=
=
=

0 | 0x00FF
#0x00FF
1 & 0x00FF
#0x00FF
0b00011111 ^ 0b11111000 #0b11100111
!0b00000001
#0b11111110

an_int = a_byte & an_int #error, undefined behavior
}
}
It should be noted that there is no implicit type casting in Doppl therefore prefix not (!) does not
yield a false when used on an integral value.

5. Conclusion
Iteration #5 defines new operators to do arithmetic, relational and binary operations. Each of
these operations can make use of parentheses to manipulate their order of precedence.

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

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
Exception states

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

5

Mais conteúdo relacionado

Mais procurados (20)

Lecture03(c expressions & operators)
Lecture03(c expressions & operators)Lecture03(c expressions & operators)
Lecture03(c expressions & operators)
 
Programming in C- Introduction
Programming in C- IntroductionProgramming in C- Introduction
Programming in C- Introduction
 
Operators and Expressions in C#
Operators and Expressions in C#Operators and Expressions in C#
Operators and Expressions in C#
 
C Token’s
C Token’sC Token’s
C Token’s
 
Getting started with c++
Getting started with c++Getting started with c++
Getting started with c++
 
2nd PUC Computer science chapter 5 review of c++
2nd PUC Computer science chapter 5   review of c++2nd PUC Computer science chapter 5   review of c++
2nd PUC Computer science chapter 5 review of c++
 
Fundamentals of Computing and C Programming - Part 1
Fundamentals of Computing and C Programming - Part 1Fundamentals of Computing and C Programming - Part 1
Fundamentals of Computing and C Programming - Part 1
 
C language
C languageC language
C language
 
Getting Started with C++
Getting Started with C++Getting Started with C++
Getting Started with C++
 
Variables in C and C++ Language
Variables in C and C++ LanguageVariables in C and C++ Language
Variables in C and C++ Language
 
C Tokens
C TokensC Tokens
C Tokens
 
Variables in C Programming
Variables in C ProgrammingVariables in C Programming
Variables in C Programming
 
Methods in C#
Methods in C#Methods in C#
Methods in C#
 
Literals,variables,datatype in C#
Literals,variables,datatype in C#Literals,variables,datatype in C#
Literals,variables,datatype in C#
 
Parametricity
ParametricityParametricity
Parametricity
 
Fundamentals of Computing and C Programming - Part 2
Fundamentals of Computing and C Programming - Part 2Fundamentals of Computing and C Programming - Part 2
Fundamentals of Computing and C Programming - Part 2
 
Operators in C Programming
Operators in C ProgrammingOperators in C Programming
Operators in C Programming
 
Assignment5
Assignment5Assignment5
Assignment5
 
C operators
C operatorsC operators
C operators
 
Mycasestudy
MycasestudyMycasestudy
Mycasestudy
 

Destaque

Presentation2
Presentation2Presentation2
Presentation2soulla8
 
How to Write Academically
How to Write AcademicallyHow to Write Academically
How to Write Academicallyrossmartian
 
Doppl development iteration #2
Doppl development   iteration #2Doppl development   iteration #2
Doppl development iteration #2Diego Perini
 
Body Fat Stripping
Body Fat StrippingBody Fat Stripping
Body Fat Strippingphaythgoydas
 
Redes de informàtica
Redes de informàticaRedes de informàtica
Redes de informàticajhongil03
 
Richard Watson Portfolio Fall 2013
Richard Watson Portfolio Fall 2013Richard Watson Portfolio Fall 2013
Richard Watson Portfolio Fall 2013Richard Watson
 
Doppl development iteration #9
Doppl development   iteration #9Doppl development   iteration #9
Doppl development iteration #9Diego Perini
 
Doppl development iteration #10
Doppl development   iteration #10Doppl development   iteration #10
Doppl development iteration #10Diego Perini
 
My secret diary
My secret diary My secret diary
My secret diary Elvire1842
 
Random things
Random thingsRandom things
Random thingslschwan
 
Google keyword planner (1)
Google keyword planner (1)Google keyword planner (1)
Google keyword planner (1)Martin Roche
 
Teens problems
Teens problemsTeens problems
Teens problemsElvire1842
 
My dream house
My dream houseMy dream house
My dream houseElvire1842
 

Destaque (15)

Presentation2
Presentation2Presentation2
Presentation2
 
How to Write Academically
How to Write AcademicallyHow to Write Academically
How to Write Academically
 
Doppl development iteration #2
Doppl development   iteration #2Doppl development   iteration #2
Doppl development iteration #2
 
My tea4er is
My tea4er isMy tea4er is
My tea4er is
 
Body Fat Stripping
Body Fat StrippingBody Fat Stripping
Body Fat Stripping
 
Redes de informàtica
Redes de informàticaRedes de informàtica
Redes de informàtica
 
Richard Watson Portfolio Fall 2013
Richard Watson Portfolio Fall 2013Richard Watson Portfolio Fall 2013
Richard Watson Portfolio Fall 2013
 
Doppl development iteration #9
Doppl development   iteration #9Doppl development   iteration #9
Doppl development iteration #9
 
Halloween
HalloweenHalloween
Halloween
 
Doppl development iteration #10
Doppl development   iteration #10Doppl development   iteration #10
Doppl development iteration #10
 
My secret diary
My secret diary My secret diary
My secret diary
 
Random things
Random thingsRandom things
Random things
 
Google keyword planner (1)
Google keyword planner (1)Google keyword planner (1)
Google keyword planner (1)
 
Teens problems
Teens problemsTeens problems
Teens problems
 
My dream house
My dream houseMy dream house
My dream house
 

Semelhante a Doppl development iteration #5

03 Operators and expressions
03 Operators and expressions03 Operators and expressions
03 Operators and expressionsmaznabili
 
operators and expressions in c++
 operators and expressions in c++ operators and expressions in c++
operators and expressions in c++sanya6900
 
C programming session 02
C programming session 02C programming session 02
C programming session 02Dushmanta Nath
 
Operators and Expressions in C#
Operators and Expressions in C#Operators and Expressions in C#
Operators and Expressions in C#Simplilearn
 
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 KuteTushar B Kute
 
03. operators and-expressions
03. operators and-expressions03. operators and-expressions
03. operators and-expressionsStoian Kirov
 
3 operators-expressions-and-statements-120712073351-phpapp01
3 operators-expressions-and-statements-120712073351-phpapp013 operators-expressions-and-statements-120712073351-phpapp01
3 operators-expressions-and-statements-120712073351-phpapp01Abdul Samee
 
3 operators-expressions-and-statements-120712073351-phpapp01
3 operators-expressions-and-statements-120712073351-phpapp013 operators-expressions-and-statements-120712073351-phpapp01
3 operators-expressions-and-statements-120712073351-phpapp01Abdul Samee
 
Verilog operators.pptx
Verilog  operators.pptxVerilog  operators.pptx
Verilog operators.pptxVandanaPagar1
 
4_A1208223655_21789_2_2018_04. Operators.ppt
4_A1208223655_21789_2_2018_04. Operators.ppt4_A1208223655_21789_2_2018_04. Operators.ppt
4_A1208223655_21789_2_2018_04. Operators.pptRithwikRanjan
 
Operators expressions-and-statements
Operators expressions-and-statementsOperators expressions-and-statements
Operators expressions-and-statementsCtOlaf
 

Semelhante a Doppl development iteration #5 (20)

Lecture 05.pptx
Lecture 05.pptxLecture 05.pptx
Lecture 05.pptx
 
03 Operators and expressions
03 Operators and expressions03 Operators and expressions
03 Operators and expressions
 
operators and expressions in c++
 operators and expressions in c++ operators and expressions in c++
operators and expressions in c++
 
C program
C programC program
C program
 
C programming session 02
C programming session 02C programming session 02
C programming session 02
 
Operators and Expressions in C#
Operators and Expressions in C#Operators and Expressions in C#
Operators and Expressions in C#
 
Types of Operators in C
Types of Operators in CTypes of Operators in C
Types of Operators 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
 
03. operators and-expressions
03. operators and-expressions03. operators and-expressions
03. operators and-expressions
 
3 operators-expressions-and-statements-120712073351-phpapp01
3 operators-expressions-and-statements-120712073351-phpapp013 operators-expressions-and-statements-120712073351-phpapp01
3 operators-expressions-and-statements-120712073351-phpapp01
 
3 operators-expressions-and-statements-120712073351-phpapp01
3 operators-expressions-and-statements-120712073351-phpapp013 operators-expressions-and-statements-120712073351-phpapp01
3 operators-expressions-and-statements-120712073351-phpapp01
 
Verilog operators.pptx
Verilog  operators.pptxVerilog  operators.pptx
Verilog operators.pptx
 
Basics of c++
Basics of c++ Basics of c++
Basics of c++
 
fundamentals of c
fundamentals of cfundamentals of c
fundamentals of c
 
4_A1208223655_21789_2_2018_04. Operators.ppt
4_A1208223655_21789_2_2018_04. Operators.ppt4_A1208223655_21789_2_2018_04. Operators.ppt
4_A1208223655_21789_2_2018_04. Operators.ppt
 
Operators expressions-and-statements
Operators expressions-and-statementsOperators expressions-and-statements
Operators expressions-and-statements
 
Java unit 3
Java unit 3Java unit 3
Java unit 3
 
Operators1.pptx
Operators1.pptxOperators1.pptx
Operators1.pptx
 
Welcome to python workshop
Welcome to python workshopWelcome to python workshop
Welcome to python workshop
 
Report on c
Report on cReport on c
Report on c
 

Mais de Diego Perini

Doppl development iteration #8
Doppl development   iteration #8Doppl development   iteration #8
Doppl development iteration #8Diego Perini
 
Doppl development iteration #7
Doppl development   iteration #7Doppl development   iteration #7
Doppl development iteration #7Diego Perini
 
Doppl development iteration #6
Doppl development   iteration #6Doppl development   iteration #6
Doppl development iteration #6Diego Perini
 
Doppl development iteration #4
Doppl development   iteration #4Doppl development   iteration #4
Doppl development iteration #4Diego Perini
 
Doppl development iteration #3
Doppl development   iteration #3Doppl development   iteration #3
Doppl development iteration #3Diego Perini
 
Doppl development iteration #1
Doppl development   iteration #1Doppl development   iteration #1
Doppl development iteration #1Diego Perini
 
Doppl Development Introduction
Doppl Development IntroductionDoppl Development Introduction
Doppl Development IntroductionDiego Perini
 

Mais de Diego Perini (7)

Doppl development iteration #8
Doppl development   iteration #8Doppl development   iteration #8
Doppl development iteration #8
 
Doppl development iteration #7
Doppl development   iteration #7Doppl development   iteration #7
Doppl development iteration #7
 
Doppl development iteration #6
Doppl development   iteration #6Doppl development   iteration #6
Doppl development iteration #6
 
Doppl development iteration #4
Doppl development   iteration #4Doppl development   iteration #4
Doppl development iteration #4
 
Doppl development iteration #3
Doppl development   iteration #3Doppl development   iteration #3
Doppl development iteration #3
 
Doppl development iteration #1
Doppl development   iteration #1Doppl development   iteration #1
Doppl development iteration #1
 
Doppl Development Introduction
Doppl Development IntroductionDoppl Development Introduction
Doppl Development Introduction
 

Último

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
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 textsMaria Levchenko
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
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 MenDelhi Call girls
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Último (20)

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
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
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Doppl development iteration #5

  • 1. DOPPL Data Oriented Parallel Programming Language Development Diary Iteration #5 Covered Concepts: Arithmetic, Relational and Binary Operators Diego PERINI Department of Computer Engineering Istanbul Technical University, Turkey 2013-07-26 1
  • 2. Abstract This paper stands for Doppl language development iteration #5. In this paper, basic operators to execute arithmetics, relations and binary operations (i.e shifting, bitwise logic) will be introduced. Previously introduced data types is used in the example source code. 1. Rationale As a high level language, Doppl uses arithmetic, relational and binary operators to compute low level calculations. These operators look nearly same with their other counterparts with a few exceptions. Each exception is explained in detail. 2. Arithmetic Operators To start with, Doppl makes use of six arithmetic operators to work with integers, floats and bytes. keyword meaning + addition - subtraction * multiplication // division with integer/byte result (floored) / division with float result % modulo +, -, *, % operators can operate on any pair of the same type and generate a result of the same type. // division operator on the other hand do only work on integers or bytes and generate a result of the same type. If the value generated cannot be represented as an integer, the value is floored. / operator always returns a float. % operator only works with integers and bytes. #Arithmetic operations task(1) Arithmetics { data a_byte = byte 2
  • 3. data an_int = int data a_float = float data another_int = int #will not be initialized #Examples init: { a_byte = 12 + 13 a_byte = 12 - 13 an_int = 12 * 13 an_int = 25 // 2 a_float = 25 / 2 an_int = 13 % 12 #25 #-1 which is converted into 0xFF #156 #12 floored from 12.5 #12.5 #1 #Below are invalid a_float = 25 // 2 #Calculation returns int or byte an_int = 12.0 + 13.0 #Type mismatch, see operator info an_int = a_float + a_byte #Type mismatch, see operator info an_int = another_int + 1 #Null data, value mismatch } } 3. Relational Operators Relational operators are special expressions that generate bool results that can be used to initialize boolean members as well as conditionally branch in a task (will be introduced later). keyword meaning < less than > greater than == equals != not equal <= less than or equal >= greater than or equal Implicit conversions are not allowed and each of these operators can only work with same type of parameters. Non-integral (i.e string) type behavior is not defined. 3
  • 4. #Relational operations task(1) Relations { data a_bool = bool #Examples init: { a_bool a_bool a_bool a_bool a_bool a_bool = = = = = = 2 < 3 2.5 > 0 1 == 1 1 != 1 15 >= 15 15 <= 14 #True #True #True #False #True #False a_bool = 1 == 1.0 #error, type mismatch } } 4. Binary Operators Binary operators are used to manipulate specific bits of values injectively. Below are the binary operators ordered by their precedence descendingly. keyword meaning & and | or ^ xor ! prefix not Like arithmetic operators, binary operators can only work on integral types. Unlike previously introduced operators, cross type usage is considered undefined behavior and should be avoided. #Binary operations task(1) Binary { data an_int = int data a_byte = byte #Examples init: { 4
  • 5. an_int an_int a_byte a_byte = = = = 0 | 0x00FF #0x00FF 1 & 0x00FF #0x00FF 0b00011111 ^ 0b11111000 #0b11100111 !0b00000001 #0b11111110 an_int = a_byte & an_int #error, undefined behavior } } It should be noted that there is no implicit type casting in Doppl therefore prefix not (!) does not yield a false when used on an integral value. 5. Conclusion Iteration #5 defines new operators to do arithmetic, relational and binary operations. Each of these operations can make use of parentheses to manipulate their order of precedence. 6. Future Concepts Below are the concepts that are likely to be introduced in next iterations. ● ● ● ● ● ● ● ● ● ● ● ● 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 Exception states 7. License CC BY-SA 3.0 http://creativecommons.org/licenses/by-sa/3.0/ 5