SlideShare a Scribd company logo
1 of 40
Download to read offline
functional parser of markdown
language based on monad combining
and monoidal source stream
representation
.
Georgiy Lukjanov (glukyanov@sfedu.ru)
Assistant professor Artem Pelenitsin (apel@sfedu.ru)
TMPA conference, 3 Feb 2017
Southern Federal University, Rostov-on-Don, Russia
Goals
.
∙ Explore approaches to structuring of computation with
multiple side-effects provided by modern Haskell
libraries
2 / 22
Goals
.
∙ Explore approaches to structuring of computation with
multiple side-effects provided by modern Haskell
libraries
∙ Monad Transformers
2 / 22
Goals
.
∙ Explore approaches to structuring of computation with
multiple side-effects provided by modern Haskell
libraries
∙ Monad Transformers
∙ Algebraic effects and effects handlers (specifically
Extensible Effects)
2 / 22
Goals
.
∙ Explore approaches to structuring of computation with
multiple side-effects provided by modern Haskell
libraries
∙ Monad Transformers
∙ Algebraic effects and effects handlers (specifically
Extensible Effects)
∙ As a case study, build parsers combinators libraries
and restricted Markdown parsers using these
approaches
2 / 22
Goals
.
∙ Explore approaches to structuring of computation with
multiple side-effects provided by modern Haskell
libraries
∙ Monad Transformers
∙ Algebraic effects and effects handlers (specifically
Extensible Effects)
∙ As a case study, build parsers combinators libraries
and restricted Markdown parsers using these
approaches
∙ Compare these approaches in terms of expressibility
and performance
2 / 22
Parsers
.
Informal definition
A parser is a program that converts text into some kind of
AST (abstract syntax tree)
3 / 22
Parsers
.
Informal definition
A parser is a program that converts text into some kind of
AST (abstract syntax tree)
∙ Auto-generated, by bottom-up parser generators (YACC)
3 / 22
Parsers
.
Informal definition
A parser is a program that converts text into some kind of
AST (abstract syntax tree)
∙ Auto-generated, by bottom-up parser generators (YACC)
∙ Manually-written (e.g. top-down recursive descent)
3 / 22
Parser Combinators
.
∙ Model parsers as higher-order functions
map :: (a → b) → [a] → [b]
map [ ] = [ ]
map f (x : xs) = f x : map f xs
4 / 22
Parser Combinators
.
∙ Model parsers as higher-order functions
map :: (a → b) → [a] → [b]
map [ ] = [ ]
map f (x : xs) = f x : map f xs
∙ Construct complex parsers from small set of basic ones
alphanum :: Parser r Char
alphanum = letter <|> digit
4 / 22
Parser Combinators
.
∙ Model parsers as higher-order functions
map :: (a → b) → [a] → [b]
map [ ] = [ ]
map f (x : xs) = f x : map f xs
∙ Construct complex parsers from small set of basic ones
alphanum :: Parser r Char
alphanum = letter <|> digit
∙ Mirror grammar rules in source code of the parser
4 / 22
Parser as a Monad
.
Parser data type
newtype Parser a = Parser {
parse :: String → Maybe (a, String)}
5 / 22
Parser as a Monad
.
Parser data type
newtype Parser a = Parser {
parse :: String → Maybe (a, String)}
Monad instance for Parser
instance Monad Parser where
return t = Parser $ λs → Just (t, s)
m >>= k = Parser $ λs →
do (u, v) ← parse m s
(x, y) ← parse (k u) v
return (x, y)
5 / 22
Types and Effects: main notions
.
∙ Pure/Impure functions and referential transparency
6 / 22
Types and Effects: main notions
.
∙ Pure/Impure functions and referential transparency
Pure function
show :: (Show a) ⇒ a → String
6 / 22
Types and Effects: main notions
.
∙ Pure/Impure functions and referential transparency
Pure function
show :: (Show a) ⇒ a → String
IO action
putStrLn :: String → IO ()
6 / 22
Types and Effects: main notions
.
∙ Static guarantees on computations permissions
7 / 22
Types and Effects: main notions
.
∙ Static guarantees on computations permissions
Computation with static environment
readUser :: (MonadReader Database m) ⇒
UserID → m UserData
7 / 22
Types and Effects: main notions
.
∙ Static guarantees on computations permissions
Computation with static environment
readUser :: (MonadReader Database m) ⇒
UserID → m UserData
∙ Combining multiple effects
7 / 22
Types and Effects: main notions
.
∙ Static guarantees on computations permissions
Computation with static environment
readUser :: (MonadReader Database m) ⇒
UserID → m UserData
∙ Combining multiple effects
Static environment and ‘mutable’ state
handler :: (MonadReader Config m
, MonadState Database m) ⇒ m a
7 / 22
Haskell frameworks for effects typing
.
Monad Transformers — type class based
class (Monad m) ⇒ MonadState m where
get :: m (StateType m)
put :: StateType m → m ()
newtype StateT s m a = StateT {runStateT :: s → m (a, s)}
instance (Monad m) ⇒ MonadState (StateT s m) where
get = StateT $ λs → return (s, s)
put s = StateT $ _ → return ((), s)
instance MonadTrans (StateT s) where ...
instance (MonadIO m) ⇒ MonadIO (StateT s m) where ...
8 / 22
Haskell frameworks for effects typing
.
Extensible Effects — free monad based
data Free f a where
Pure :: a → Free f a
Impure :: f (Free f a) → Free f a
data State s v where
Get :: State s s
Put :: !s → State s ()
instance Functor (State s)
type FState s = Free (State s)
9 / 22
Parser as a monadic stack
.
Parser
newtype Parser a = Parser (StateT String Maybe a)
10 / 22
Parser as a monadic stack
.
Parser
newtype Parser a = Parser (StateT String Maybe a)
Running a parser
parse :: Parser a → String → Maybe (a, String t)
parse (Parser p) s = runStateT p s
10 / 22
Parser as a Union of Effects
.
type Parsable r = (Member Fail r, Member (State String) r)
type Parser r a = Parsable r ⇒ Eff r a
11 / 22
Parser as a Union of Effects
.
type Parsable r = (Member Fail r, Member (State String) r)
type Parser r a = Parsable r ⇒ Eff r a
Running a parser (handling effects)
parse :: Eff (Fail ’: State String ’ : [ ]) a →
String → (Either () a, String)
parse p inp = run $ runState (runError p) inp
11 / 22
Basic parsers
.
Unconditional consumer
item :: Parser r Char
item = do s ← get
case s of [ ] → put s >> die
(x : xs) → put xs >> pure x
12 / 22
Basic parsers
.
Unconditional consumer
item :: Parser r Char
item = do s ← get
case s of [ ] → put s >> die
(x : xs) → put xs >> pure x
Conditional consumer
sat :: (Char → Bool) → Parser r Char
sat p = do x ← item
if p x then return x else die
12 / 22
Parsers combinators
.
Determenistic alternative combinator
alt :: Parser r a → Parser r a → Parser r a
alt ma mb = do s ← get
catchExc ma $ λea →
put s >> catchExc mb $ λeb → die
13 / 22
Parsers combinators
.
Determenistic alternative combinator
alt :: Parser r a → Parser r a → Parser r a
alt ma mb = do s ← get
catchExc ma $ λea →
put s >> catchExc mb $ λeb → die
Repetition combinator
many :: Parser r a → Parser r [a]
many v = many_v
where many_v = some_v ‘alt‘ (pure [ ])
some_v = (fmap (:) v) < ∗ > many_v
13 / 22
Restricted Markdown AST
.
Document
type Document = [Block]
Block
data Block = Blank
| Header (Int, Line)
| Paragraph [Line]
| UnorderedList [Line]
| BlockQuote [Line]
14 / 22
Constructing AST
.
Parser for Document
doc :: Parser Document
doc = many block
where block = blank <|> header <|> paragraph
<|> unorderdList <|> blockquote
<|> blockMath
Parser for headers
header :: Parser Block
header = do
hashes ← token $ some $ char ’#’
text ← nonEmptyLine
return $ Header (length hashes, text)
15 / 22
Performance benchmarks. MTL
.
Estimate Confidence interval
Mean time 121 μs [119 μs, 126 μs]
σ 10.0 μs [20.2 μs, 3.84 μs]
16 / 22
Performance benchmarks. Freer EE
.
Estimate Confidence interval
Mean time 7.53 ms [7.44 ms, 7.66 ms]
σ 289 μs [194 μs, 436 μs]
17 / 22
String-like types in Haskell
.
String
Essentially a [Char] — poor performance
ByteString
High performance, but low-level interface
Text
Unicode-oriented high performance type
18 / 22
Text-oriented Monoids
.
Input-polymorphic base parser
item :: TextualMonoid t ⇒ Parser t Char
item = do
s ← splitCharacterPrefix ◦ remainder < $ > get
case s of Nothing → throwError
Just (c, rest) → put rest ∗ > pure c
‘uncons’-like function
splitCharacterPrefix :: TextualMonoid t ⇒
t → Maybe (Char, t)
19 / 22
Conclusion and results
.
1. Parsers combinators library and Markdown parser
based on Monad Transformers.
∙ https://github.com/geo2a/markdown_monparsing
2. Parsers combinators library and Markdown parser
based on Extensible Effects.
∙ https://github.com/geo2a/ext-effects-parsers
∙ https://github.com/geo2a/ext-effects-markdown
3. Performance comparison of Monad Transformers and
Extensible Effects based libraries.
20 / 22
References
.
∙ Monadic Parser Combinators // Graham Hutton, Erik
Meijer – Department of Computer Science, University of
Nottingham, 1996
∙ Adding Structure to Monoids // Mario Blaževic – Stilo
International plc
∙ Extensible Effects An Alternative to Monad
Transformers // Oleg Kiselyov, Amr Sabry, Cameron
Swords – Indiana University, USA
∙ Freer monads and more extensible effects // Oleg
Kiselyov, Hiromi Ishii
21 / 22
Questions?
.
Results outline
1. Parsers combinators library and Markdown parser
based on Monad Transformers.
2. Parsers combinators library and Markdown parser
based on Extensible Effects.
3. Performance comparison of Monad Transformers and
Extensible Effects based libraries.
Georgiy Lukyanov glukyanov@sfedu.ru
Artem Pelenitsin apel@sfedu.ru
22 / 22

More Related Content

What's hot

Cs301 mid-term-mega-file
Cs301 mid-term-mega-fileCs301 mid-term-mega-file
Cs301 mid-term-mega-fileWartollames
 
Unit ii(dsc++)
Unit ii(dsc++)Unit ii(dsc++)
Unit ii(dsc++)Durga Devi
 
High-Performance Haskell
High-Performance HaskellHigh-Performance Haskell
High-Performance HaskellJohan Tibell
 
Reasoning about laziness
Reasoning about lazinessReasoning about laziness
Reasoning about lazinessJohan Tibell
 
Java Performance Tips (So Code Camp San Diego 2014)
Java Performance Tips (So Code Camp San Diego 2014)Java Performance Tips (So Code Camp San Diego 2014)
Java Performance Tips (So Code Camp San Diego 2014)Kai Chan
 
Search Engine-Building with Lucene and Solr, Part 1 (SoCal Code Camp LA 2013)
Search Engine-Building with Lucene and Solr, Part 1 (SoCal Code Camp LA 2013)Search Engine-Building with Lucene and Solr, Part 1 (SoCal Code Camp LA 2013)
Search Engine-Building with Lucene and Solr, Part 1 (SoCal Code Camp LA 2013)Kai Chan
 
Search Engine-Building with Lucene and Solr, Part 2 (SoCal Code Camp LA 2013)
Search Engine-Building with Lucene and Solr, Part 2 (SoCal Code Camp LA 2013)Search Engine-Building with Lucene and Solr, Part 2 (SoCal Code Camp LA 2013)
Search Engine-Building with Lucene and Solr, Part 2 (SoCal Code Camp LA 2013)Kai Chan
 
linked list (c#)
 linked list (c#) linked list (c#)
linked list (c#)swajahatr
 
Coding with LINQ, Patterns & Practices
Coding with LINQ, Patterns & PracticesCoding with LINQ, Patterns & Practices
Coding with LINQ, Patterns & PracticesTuomas Hietanen
 
Data structure , stack , queue
Data structure , stack , queueData structure , stack , queue
Data structure , stack , queueRajkiran Nadar
 
Data Structure (Dynamic Array and Linked List)
Data Structure (Dynamic Array and Linked List)Data Structure (Dynamic Array and Linked List)
Data Structure (Dynamic Array and Linked List)Adam Mukharil Bachtiar
 

What's hot (20)

Cs301 mid-term-mega-file
Cs301 mid-term-mega-fileCs301 mid-term-mega-file
Cs301 mid-term-mega-file
 
Data Structure (Circular Linked List)
Data Structure (Circular Linked List)Data Structure (Circular Linked List)
Data Structure (Circular Linked List)
 
Data Structure (Double Linked List)
Data Structure (Double Linked List)Data Structure (Double Linked List)
Data Structure (Double Linked List)
 
Unit ii(dsc++)
Unit ii(dsc++)Unit ii(dsc++)
Unit ii(dsc++)
 
Haskell
HaskellHaskell
Haskell
 
Lists
ListsLists
Lists
 
High-Performance Haskell
High-Performance HaskellHigh-Performance Haskell
High-Performance Haskell
 
Reasoning about laziness
Reasoning about lazinessReasoning about laziness
Reasoning about laziness
 
Java Performance Tips (So Code Camp San Diego 2014)
Java Performance Tips (So Code Camp San Diego 2014)Java Performance Tips (So Code Camp San Diego 2014)
Java Performance Tips (So Code Camp San Diego 2014)
 
Link List
Link ListLink List
Link List
 
Search Engine-Building with Lucene and Solr, Part 1 (SoCal Code Camp LA 2013)
Search Engine-Building with Lucene and Solr, Part 1 (SoCal Code Camp LA 2013)Search Engine-Building with Lucene and Solr, Part 1 (SoCal Code Camp LA 2013)
Search Engine-Building with Lucene and Solr, Part 1 (SoCal Code Camp LA 2013)
 
09. haskell Context
09. haskell Context09. haskell Context
09. haskell Context
 
Search Engine-Building with Lucene and Solr, Part 2 (SoCal Code Camp LA 2013)
Search Engine-Building with Lucene and Solr, Part 2 (SoCal Code Camp LA 2013)Search Engine-Building with Lucene and Solr, Part 2 (SoCal Code Camp LA 2013)
Search Engine-Building with Lucene and Solr, Part 2 (SoCal Code Camp LA 2013)
 
linked list (c#)
 linked list (c#) linked list (c#)
linked list (c#)
 
Coding with LINQ, Patterns & Practices
Coding with LINQ, Patterns & PracticesCoding with LINQ, Patterns & Practices
Coding with LINQ, Patterns & Practices
 
Standard Library Functions
Standard Library FunctionsStandard Library Functions
Standard Library Functions
 
Data structure , stack , queue
Data structure , stack , queueData structure , stack , queue
Data structure , stack , queue
 
Data Structure (Dynamic Array and Linked List)
Data Structure (Dynamic Array and Linked List)Data Structure (Dynamic Array and Linked List)
Data Structure (Dynamic Array and Linked List)
 
Linked list
Linked listLinked list
Linked list
 
Pipes and filters
Pipes and filtersPipes and filters
Pipes and filters
 

Viewers also liked

TMPA-2017: Modeling of PLC-programs by High-level Coloured Petri Nets
TMPA-2017: Modeling of PLC-programs by High-level Coloured Petri NetsTMPA-2017: Modeling of PLC-programs by High-level Coloured Petri Nets
TMPA-2017: Modeling of PLC-programs by High-level Coloured Petri NetsIosif Itkin
 
TMPA-2017: Stemming Architectural Decay in Software Systems
TMPA-2017:  Stemming Architectural Decay in Software SystemsTMPA-2017:  Stemming Architectural Decay in Software Systems
TMPA-2017: Stemming Architectural Decay in Software SystemsIosif Itkin
 
TMPA-2017: Layered Layouts for Software Systems Visualization
TMPA-2017: Layered Layouts for Software Systems VisualizationTMPA-2017: Layered Layouts for Software Systems Visualization
TMPA-2017: Layered Layouts for Software Systems VisualizationIosif Itkin
 
TMPA-2017: Dl-Check: Dynamic Potential Deadlock Detection Tool for Java Programs
TMPA-2017: Dl-Check: Dynamic Potential Deadlock Detection Tool for Java ProgramsTMPA-2017: Dl-Check: Dynamic Potential Deadlock Detection Tool for Java Programs
TMPA-2017: Dl-Check: Dynamic Potential Deadlock Detection Tool for Java ProgramsIosif Itkin
 
TMPA-2017: The Quest for Average Response Time
TMPA-2017: The Quest for Average Response TimeTMPA-2017: The Quest for Average Response Time
TMPA-2017: The Quest for Average Response TimeIosif Itkin
 
TMPA-2017: Simple Type Based Alias Analysis for a VLIW Processor
TMPA-2017: Simple Type Based Alias Analysis for a VLIW ProcessorTMPA-2017: Simple Type Based Alias Analysis for a VLIW Processor
TMPA-2017: Simple Type Based Alias Analysis for a VLIW ProcessorIosif Itkin
 
TMPA-2017: Predicate Abstraction Based Configurable Method for Data Race Dete...
TMPA-2017: Predicate Abstraction Based Configurable Method for Data Race Dete...TMPA-2017: Predicate Abstraction Based Configurable Method for Data Race Dete...
TMPA-2017: Predicate Abstraction Based Configurable Method for Data Race Dete...Iosif Itkin
 
TMPA-2017: A Survey of High-Performance Computing for Software Verification
TMPA-2017: A Survey of High-Performance Computing for Software VerificationTMPA-2017: A Survey of High-Performance Computing for Software Verification
TMPA-2017: A Survey of High-Performance Computing for Software VerificationIosif Itkin
 
TMPA-2017: Technology and Tools for Developing Industrial Software Test Suite...
TMPA-2017: Technology and Tools for Developing Industrial Software Test Suite...TMPA-2017: Technology and Tools for Developing Industrial Software Test Suite...
TMPA-2017: Technology and Tools for Developing Industrial Software Test Suite...Iosif Itkin
 
TMPA-2017: Extended Context-Free Grammars Parsing with Generalized LL
TMPA-2017: Extended Context-Free Grammars Parsing with Generalized LLTMPA-2017: Extended Context-Free Grammars Parsing with Generalized LL
TMPA-2017: Extended Context-Free Grammars Parsing with Generalized LLIosif Itkin
 
TMPA-2017: Evolutionary Algorithms in Test Generation for digital systems
TMPA-2017: Evolutionary Algorithms in Test Generation for digital systemsTMPA-2017: Evolutionary Algorithms in Test Generation for digital systems
TMPA-2017: Evolutionary Algorithms in Test Generation for digital systemsIosif Itkin
 
TMPA-2017: Conference Opening
TMPA-2017: Conference OpeningTMPA-2017: Conference Opening
TMPA-2017: Conference OpeningIosif Itkin
 
TMPA-2017: Using Functional Directives to Analyze Code Complexity and Communi...
TMPA-2017: Using Functional Directives to Analyze Code Complexity and Communi...TMPA-2017: Using Functional Directives to Analyze Code Complexity and Communi...
TMPA-2017: Using Functional Directives to Analyze Code Complexity and Communi...Iosif Itkin
 
TMPA-2017: A Survey on Model-Based Testing Tools for Test Case Generation
TMPA-2017: A Survey on Model-Based Testing Tools for Test Case GenerationTMPA-2017: A Survey on Model-Based Testing Tools for Test Case Generation
TMPA-2017: A Survey on Model-Based Testing Tools for Test Case GenerationIosif Itkin
 
TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...
TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...
TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...Iosif Itkin
 
TMPA-2017: Static Checking of Array Objects in JavaScript
TMPA-2017: Static Checking of Array Objects in JavaScriptTMPA-2017: Static Checking of Array Objects in JavaScript
TMPA-2017: Static Checking of Array Objects in JavaScriptIosif Itkin
 
TMPA-2017: Defect Report Classification in Accordance with Areas of Testing
TMPA-2017: Defect Report Classification in Accordance with Areas of TestingTMPA-2017: Defect Report Classification in Accordance with Areas of Testing
TMPA-2017: Defect Report Classification in Accordance with Areas of TestingIosif Itkin
 
TMPA-2017: 5W+1H Static Analysis Report Quality Measure
TMPA-2017: 5W+1H Static Analysis Report Quality MeasureTMPA-2017: 5W+1H Static Analysis Report Quality Measure
TMPA-2017: 5W+1H Static Analysis Report Quality MeasureIosif Itkin
 
TMPA-2017: Generating Cost Aware Covering Arrays For Free
TMPA-2017: Generating Cost Aware Covering Arrays For Free TMPA-2017: Generating Cost Aware Covering Arrays For Free
TMPA-2017: Generating Cost Aware Covering Arrays For Free Iosif Itkin
 
TMPA-2017: Live testing distributed system fault tolerance with fault injecti...
TMPA-2017: Live testing distributed system fault tolerance with fault injecti...TMPA-2017: Live testing distributed system fault tolerance with fault injecti...
TMPA-2017: Live testing distributed system fault tolerance with fault injecti...Iosif Itkin
 

Viewers also liked (20)

TMPA-2017: Modeling of PLC-programs by High-level Coloured Petri Nets
TMPA-2017: Modeling of PLC-programs by High-level Coloured Petri NetsTMPA-2017: Modeling of PLC-programs by High-level Coloured Petri Nets
TMPA-2017: Modeling of PLC-programs by High-level Coloured Petri Nets
 
TMPA-2017: Stemming Architectural Decay in Software Systems
TMPA-2017:  Stemming Architectural Decay in Software SystemsTMPA-2017:  Stemming Architectural Decay in Software Systems
TMPA-2017: Stemming Architectural Decay in Software Systems
 
TMPA-2017: Layered Layouts for Software Systems Visualization
TMPA-2017: Layered Layouts for Software Systems VisualizationTMPA-2017: Layered Layouts for Software Systems Visualization
TMPA-2017: Layered Layouts for Software Systems Visualization
 
TMPA-2017: Dl-Check: Dynamic Potential Deadlock Detection Tool for Java Programs
TMPA-2017: Dl-Check: Dynamic Potential Deadlock Detection Tool for Java ProgramsTMPA-2017: Dl-Check: Dynamic Potential Deadlock Detection Tool for Java Programs
TMPA-2017: Dl-Check: Dynamic Potential Deadlock Detection Tool for Java Programs
 
TMPA-2017: The Quest for Average Response Time
TMPA-2017: The Quest for Average Response TimeTMPA-2017: The Quest for Average Response Time
TMPA-2017: The Quest for Average Response Time
 
TMPA-2017: Simple Type Based Alias Analysis for a VLIW Processor
TMPA-2017: Simple Type Based Alias Analysis for a VLIW ProcessorTMPA-2017: Simple Type Based Alias Analysis for a VLIW Processor
TMPA-2017: Simple Type Based Alias Analysis for a VLIW Processor
 
TMPA-2017: Predicate Abstraction Based Configurable Method for Data Race Dete...
TMPA-2017: Predicate Abstraction Based Configurable Method for Data Race Dete...TMPA-2017: Predicate Abstraction Based Configurable Method for Data Race Dete...
TMPA-2017: Predicate Abstraction Based Configurable Method for Data Race Dete...
 
TMPA-2017: A Survey of High-Performance Computing for Software Verification
TMPA-2017: A Survey of High-Performance Computing for Software VerificationTMPA-2017: A Survey of High-Performance Computing for Software Verification
TMPA-2017: A Survey of High-Performance Computing for Software Verification
 
TMPA-2017: Technology and Tools for Developing Industrial Software Test Suite...
TMPA-2017: Technology and Tools for Developing Industrial Software Test Suite...TMPA-2017: Technology and Tools for Developing Industrial Software Test Suite...
TMPA-2017: Technology and Tools for Developing Industrial Software Test Suite...
 
TMPA-2017: Extended Context-Free Grammars Parsing with Generalized LL
TMPA-2017: Extended Context-Free Grammars Parsing with Generalized LLTMPA-2017: Extended Context-Free Grammars Parsing with Generalized LL
TMPA-2017: Extended Context-Free Grammars Parsing with Generalized LL
 
TMPA-2017: Evolutionary Algorithms in Test Generation for digital systems
TMPA-2017: Evolutionary Algorithms in Test Generation for digital systemsTMPA-2017: Evolutionary Algorithms in Test Generation for digital systems
TMPA-2017: Evolutionary Algorithms in Test Generation for digital systems
 
TMPA-2017: Conference Opening
TMPA-2017: Conference OpeningTMPA-2017: Conference Opening
TMPA-2017: Conference Opening
 
TMPA-2017: Using Functional Directives to Analyze Code Complexity and Communi...
TMPA-2017: Using Functional Directives to Analyze Code Complexity and Communi...TMPA-2017: Using Functional Directives to Analyze Code Complexity and Communi...
TMPA-2017: Using Functional Directives to Analyze Code Complexity and Communi...
 
TMPA-2017: A Survey on Model-Based Testing Tools for Test Case Generation
TMPA-2017: A Survey on Model-Based Testing Tools for Test Case GenerationTMPA-2017: A Survey on Model-Based Testing Tools for Test Case Generation
TMPA-2017: A Survey on Model-Based Testing Tools for Test Case Generation
 
TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...
TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...
TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...
 
TMPA-2017: Static Checking of Array Objects in JavaScript
TMPA-2017: Static Checking of Array Objects in JavaScriptTMPA-2017: Static Checking of Array Objects in JavaScript
TMPA-2017: Static Checking of Array Objects in JavaScript
 
TMPA-2017: Defect Report Classification in Accordance with Areas of Testing
TMPA-2017: Defect Report Classification in Accordance with Areas of TestingTMPA-2017: Defect Report Classification in Accordance with Areas of Testing
TMPA-2017: Defect Report Classification in Accordance with Areas of Testing
 
TMPA-2017: 5W+1H Static Analysis Report Quality Measure
TMPA-2017: 5W+1H Static Analysis Report Quality MeasureTMPA-2017: 5W+1H Static Analysis Report Quality Measure
TMPA-2017: 5W+1H Static Analysis Report Quality Measure
 
TMPA-2017: Generating Cost Aware Covering Arrays For Free
TMPA-2017: Generating Cost Aware Covering Arrays For Free TMPA-2017: Generating Cost Aware Covering Arrays For Free
TMPA-2017: Generating Cost Aware Covering Arrays For Free
 
TMPA-2017: Live testing distributed system fault tolerance with fault injecti...
TMPA-2017: Live testing distributed system fault tolerance with fault injecti...TMPA-2017: Live testing distributed system fault tolerance with fault injecti...
TMPA-2017: Live testing distributed system fault tolerance with fault injecti...
 

Similar to TMPA-2017: Functional Parser of Markdown Language Based on Monad Combining and Monoidal Source Stream Representation

Parsers Combinators in Scala, Ilya @lambdamix Kliuchnikov
Parsers Combinators in Scala, Ilya @lambdamix KliuchnikovParsers Combinators in Scala, Ilya @lambdamix Kliuchnikov
Parsers Combinators in Scala, Ilya @lambdamix KliuchnikovVasil Remeniuk
 
Toward Haskell Transformers
Toward Haskell TransformersToward Haskell Transformers
Toward Haskell TransformersAntoine Leblanc
 
Functional programming in javascript
Functional programming in javascriptFunctional programming in javascript
Functional programming in javascriptBoris Burdiliak
 
List-based Monadic Computations for Dynamically Typed Languages (Python version)
List-based Monadic Computations for Dynamically Typed Languages (Python version)List-based Monadic Computations for Dynamically Typed Languages (Python version)
List-based Monadic Computations for Dynamically Typed Languages (Python version)Wim Vanderbauwhede
 
Hierarchical free monads and software design in fp
Hierarchical free monads and software design in fpHierarchical free monads and software design in fp
Hierarchical free monads and software design in fpAlexander Granin
 
Functional programming ii
Functional programming iiFunctional programming ii
Functional programming iiPrashant Kalkar
 
The what over the how (another way on android development with kotlin)
The what over the how (another way on android development with kotlin)The what over the how (another way on android development with kotlin)
The what over the how (another way on android development with kotlin)Jose Manuel Pereira Garcia
 
Matlab Functions
Matlab FunctionsMatlab Functions
Matlab FunctionsUmer Azeem
 
Monads and Monoids by Oleksiy Dyagilev
Monads and Monoids by Oleksiy DyagilevMonads and Monoids by Oleksiy Dyagilev
Monads and Monoids by Oleksiy DyagilevJavaDayUA
 
Scala. Introduction to FP. Monads
Scala. Introduction to FP. MonadsScala. Introduction to FP. Monads
Scala. Introduction to FP. MonadsKirill Kozlov
 
MATLAB-Cheat-Sheet-for-Data-Science_LondonSchoolofEconomics (1).pdf
MATLAB-Cheat-Sheet-for-Data-Science_LondonSchoolofEconomics (1).pdfMATLAB-Cheat-Sheet-for-Data-Science_LondonSchoolofEconomics (1).pdf
MATLAB-Cheat-Sheet-for-Data-Science_LondonSchoolofEconomics (1).pdfCentral university of Haryana
 
Programming in Scala - Lecture Four
Programming in Scala - Lecture FourProgramming in Scala - Lecture Four
Programming in Scala - Lecture FourAngelo Corsaro
 
Query Optimization - Brandon Latronica
Query Optimization - Brandon LatronicaQuery Optimization - Brandon Latronica
Query Optimization - Brandon Latronica"FENG "GEORGE"" YU
 
Humble introduction to category theory in haskell
Humble introduction to category theory in haskellHumble introduction to category theory in haskell
Humble introduction to category theory in haskellJongsoo Lee
 
4 R Tutorial DPLYR Apply Function
4 R Tutorial DPLYR Apply Function4 R Tutorial DPLYR Apply Function
4 R Tutorial DPLYR Apply FunctionSakthi Dasans
 

Similar to TMPA-2017: Functional Parser of Markdown Language Based on Monad Combining and Monoidal Source Stream Representation (20)

Parsers Combinators in Scala, Ilya @lambdamix Kliuchnikov
Parsers Combinators in Scala, Ilya @lambdamix KliuchnikovParsers Combinators in Scala, Ilya @lambdamix Kliuchnikov
Parsers Combinators in Scala, Ilya @lambdamix Kliuchnikov
 
Toward Haskell Transformers
Toward Haskell TransformersToward Haskell Transformers
Toward Haskell Transformers
 
Java 8 Lambda and Streams
Java 8 Lambda and StreamsJava 8 Lambda and Streams
Java 8 Lambda and Streams
 
Java 8
Java 8Java 8
Java 8
 
Functional programming in javascript
Functional programming in javascriptFunctional programming in javascript
Functional programming in javascript
 
List-based Monadic Computations for Dynamically Typed Languages (Python version)
List-based Monadic Computations for Dynamically Typed Languages (Python version)List-based Monadic Computations for Dynamically Typed Languages (Python version)
List-based Monadic Computations for Dynamically Typed Languages (Python version)
 
Hierarchical free monads and software design in fp
Hierarchical free monads and software design in fpHierarchical free monads and software design in fp
Hierarchical free monads and software design in fp
 
Functional programming ii
Functional programming iiFunctional programming ii
Functional programming ii
 
The what over the how (another way on android development with kotlin)
The what over the how (another way on android development with kotlin)The what over the how (another way on android development with kotlin)
The what over the how (another way on android development with kotlin)
 
Matlab Functions
Matlab FunctionsMatlab Functions
Matlab Functions
 
Monads and Monoids by Oleksiy Dyagilev
Monads and Monoids by Oleksiy DyagilevMonads and Monoids by Oleksiy Dyagilev
Monads and Monoids by Oleksiy Dyagilev
 
Scala. Introduction to FP. Monads
Scala. Introduction to FP. MonadsScala. Introduction to FP. Monads
Scala. Introduction to FP. Monads
 
MATLAB-Cheat-Sheet-for-Data-Science_LondonSchoolofEconomics (1).pdf
MATLAB-Cheat-Sheet-for-Data-Science_LondonSchoolofEconomics (1).pdfMATLAB-Cheat-Sheet-for-Data-Science_LondonSchoolofEconomics (1).pdf
MATLAB-Cheat-Sheet-for-Data-Science_LondonSchoolofEconomics (1).pdf
 
Programming in Scala - Lecture Four
Programming in Scala - Lecture FourProgramming in Scala - Lecture Four
Programming in Scala - Lecture Four
 
Query Optimization - Brandon Latronica
Query Optimization - Brandon LatronicaQuery Optimization - Brandon Latronica
Query Optimization - Brandon Latronica
 
Humble introduction to category theory in haskell
Humble introduction to category theory in haskellHumble introduction to category theory in haskell
Humble introduction to category theory in haskell
 
MTL Versus Free
MTL Versus FreeMTL Versus Free
MTL Versus Free
 
Frp2016 3
Frp2016 3Frp2016 3
Frp2016 3
 
4 R Tutorial DPLYR Apply Function
4 R Tutorial DPLYR Apply Function4 R Tutorial DPLYR Apply Function
4 R Tutorial DPLYR Apply Function
 
Matlab commands
Matlab commandsMatlab commands
Matlab commands
 

More from Iosif Itkin

Foundations of Software Testing Lecture 4
Foundations of Software Testing Lecture 4Foundations of Software Testing Lecture 4
Foundations of Software Testing Lecture 4Iosif Itkin
 
QA Financial Forum London 2021 - Automation in Software Testing. Humans and C...
QA Financial Forum London 2021 - Automation in Software Testing. Humans and C...QA Financial Forum London 2021 - Automation in Software Testing. Humans and C...
QA Financial Forum London 2021 - Automation in Software Testing. Humans and C...Iosif Itkin
 
Exactpro FinTech Webinar - Global Exchanges Test Oracles
Exactpro FinTech Webinar - Global Exchanges Test OraclesExactpro FinTech Webinar - Global Exchanges Test Oracles
Exactpro FinTech Webinar - Global Exchanges Test OraclesIosif Itkin
 
Exactpro FinTech Webinar - Global Exchanges FIX Protocol
Exactpro FinTech Webinar - Global Exchanges FIX ProtocolExactpro FinTech Webinar - Global Exchanges FIX Protocol
Exactpro FinTech Webinar - Global Exchanges FIX ProtocolIosif Itkin
 
Operational Resilience in Financial Market Infrastructures
Operational Resilience in Financial Market InfrastructuresOperational Resilience in Financial Market Infrastructures
Operational Resilience in Financial Market InfrastructuresIosif Itkin
 
20 Simple Questions from Exactpro for Your Enjoyment This Holiday Season
20 Simple Questions from Exactpro for Your Enjoyment This Holiday Season20 Simple Questions from Exactpro for Your Enjoyment This Holiday Season
20 Simple Questions from Exactpro for Your Enjoyment This Holiday SeasonIosif Itkin
 
Testing the Intelligence of your AI
Testing the Intelligence of your AITesting the Intelligence of your AI
Testing the Intelligence of your AIIosif Itkin
 
EXTENT 2019: Exactpro Quality Assurance for Financial Market Infrastructures
EXTENT 2019: Exactpro Quality Assurance for Financial Market InfrastructuresEXTENT 2019: Exactpro Quality Assurance for Financial Market Infrastructures
EXTENT 2019: Exactpro Quality Assurance for Financial Market InfrastructuresIosif Itkin
 
ClearTH Test Automation Framework: Case Study in IRS & CDS Swaps Lifecycle Mo...
ClearTH Test Automation Framework: Case Study in IRS & CDS Swaps Lifecycle Mo...ClearTH Test Automation Framework: Case Study in IRS & CDS Swaps Lifecycle Mo...
ClearTH Test Automation Framework: Case Study in IRS & CDS Swaps Lifecycle Mo...Iosif Itkin
 
EXTENT Talks 2019 Tbilisi: Failover and Recovery Test Automation - Ivan Shamrai
EXTENT Talks 2019 Tbilisi: Failover and Recovery Test Automation - Ivan ShamraiEXTENT Talks 2019 Tbilisi: Failover and Recovery Test Automation - Ivan Shamrai
EXTENT Talks 2019 Tbilisi: Failover and Recovery Test Automation - Ivan ShamraiIosif Itkin
 
EXTENT Talks QA Community Tbilisi 20 April 2019 - Conference Open
EXTENT Talks QA Community Tbilisi 20 April 2019 - Conference OpenEXTENT Talks QA Community Tbilisi 20 April 2019 - Conference Open
EXTENT Talks QA Community Tbilisi 20 April 2019 - Conference OpenIosif Itkin
 
User-Assisted Log Analysis for Quality Control of Distributed Fintech Applica...
User-Assisted Log Analysis for Quality Control of Distributed Fintech Applica...User-Assisted Log Analysis for Quality Control of Distributed Fintech Applica...
User-Assisted Log Analysis for Quality Control of Distributed Fintech Applica...Iosif Itkin
 
QAFF Chicago 2019 - Complex Post-Trade Systems, Requirements Traceability and...
QAFF Chicago 2019 - Complex Post-Trade Systems, Requirements Traceability and...QAFF Chicago 2019 - Complex Post-Trade Systems, Requirements Traceability and...
QAFF Chicago 2019 - Complex Post-Trade Systems, Requirements Traceability and...Iosif Itkin
 
QA Community Saratov: Past, Present, Future (2019-02-08)
QA Community Saratov: Past, Present, Future (2019-02-08)QA Community Saratov: Past, Present, Future (2019-02-08)
QA Community Saratov: Past, Present, Future (2019-02-08)Iosif Itkin
 
Machine Learning and RoboCop Testing
Machine Learning and RoboCop TestingMachine Learning and RoboCop Testing
Machine Learning and RoboCop TestingIosif Itkin
 
Behaviour Driven Development: Oltre i limiti del possibile
Behaviour Driven Development: Oltre i limiti del possibileBehaviour Driven Development: Oltre i limiti del possibile
Behaviour Driven Development: Oltre i limiti del possibileIosif Itkin
 
2018 - Exactpro Year in Review
2018 - Exactpro Year in Review2018 - Exactpro Year in Review
2018 - Exactpro Year in ReviewIosif Itkin
 
Exactpro Discussion about Joy and Strategy
Exactpro Discussion about Joy and StrategyExactpro Discussion about Joy and Strategy
Exactpro Discussion about Joy and StrategyIosif Itkin
 
FIX EMEA Conference 2018 - Post Trade Software Testing Challenges
FIX EMEA Conference 2018 - Post Trade Software Testing ChallengesFIX EMEA Conference 2018 - Post Trade Software Testing Challenges
FIX EMEA Conference 2018 - Post Trade Software Testing ChallengesIosif Itkin
 
BDD. The Outer Limits. Iosif Itkin at Youcon (in Russian)
BDD. The Outer Limits. Iosif Itkin at Youcon (in Russian)BDD. The Outer Limits. Iosif Itkin at Youcon (in Russian)
BDD. The Outer Limits. Iosif Itkin at Youcon (in Russian)Iosif Itkin
 

More from Iosif Itkin (20)

Foundations of Software Testing Lecture 4
Foundations of Software Testing Lecture 4Foundations of Software Testing Lecture 4
Foundations of Software Testing Lecture 4
 
QA Financial Forum London 2021 - Automation in Software Testing. Humans and C...
QA Financial Forum London 2021 - Automation in Software Testing. Humans and C...QA Financial Forum London 2021 - Automation in Software Testing. Humans and C...
QA Financial Forum London 2021 - Automation in Software Testing. Humans and C...
 
Exactpro FinTech Webinar - Global Exchanges Test Oracles
Exactpro FinTech Webinar - Global Exchanges Test OraclesExactpro FinTech Webinar - Global Exchanges Test Oracles
Exactpro FinTech Webinar - Global Exchanges Test Oracles
 
Exactpro FinTech Webinar - Global Exchanges FIX Protocol
Exactpro FinTech Webinar - Global Exchanges FIX ProtocolExactpro FinTech Webinar - Global Exchanges FIX Protocol
Exactpro FinTech Webinar - Global Exchanges FIX Protocol
 
Operational Resilience in Financial Market Infrastructures
Operational Resilience in Financial Market InfrastructuresOperational Resilience in Financial Market Infrastructures
Operational Resilience in Financial Market Infrastructures
 
20 Simple Questions from Exactpro for Your Enjoyment This Holiday Season
20 Simple Questions from Exactpro for Your Enjoyment This Holiday Season20 Simple Questions from Exactpro for Your Enjoyment This Holiday Season
20 Simple Questions from Exactpro for Your Enjoyment This Holiday Season
 
Testing the Intelligence of your AI
Testing the Intelligence of your AITesting the Intelligence of your AI
Testing the Intelligence of your AI
 
EXTENT 2019: Exactpro Quality Assurance for Financial Market Infrastructures
EXTENT 2019: Exactpro Quality Assurance for Financial Market InfrastructuresEXTENT 2019: Exactpro Quality Assurance for Financial Market Infrastructures
EXTENT 2019: Exactpro Quality Assurance for Financial Market Infrastructures
 
ClearTH Test Automation Framework: Case Study in IRS & CDS Swaps Lifecycle Mo...
ClearTH Test Automation Framework: Case Study in IRS & CDS Swaps Lifecycle Mo...ClearTH Test Automation Framework: Case Study in IRS & CDS Swaps Lifecycle Mo...
ClearTH Test Automation Framework: Case Study in IRS & CDS Swaps Lifecycle Mo...
 
EXTENT Talks 2019 Tbilisi: Failover and Recovery Test Automation - Ivan Shamrai
EXTENT Talks 2019 Tbilisi: Failover and Recovery Test Automation - Ivan ShamraiEXTENT Talks 2019 Tbilisi: Failover and Recovery Test Automation - Ivan Shamrai
EXTENT Talks 2019 Tbilisi: Failover and Recovery Test Automation - Ivan Shamrai
 
EXTENT Talks QA Community Tbilisi 20 April 2019 - Conference Open
EXTENT Talks QA Community Tbilisi 20 April 2019 - Conference OpenEXTENT Talks QA Community Tbilisi 20 April 2019 - Conference Open
EXTENT Talks QA Community Tbilisi 20 April 2019 - Conference Open
 
User-Assisted Log Analysis for Quality Control of Distributed Fintech Applica...
User-Assisted Log Analysis for Quality Control of Distributed Fintech Applica...User-Assisted Log Analysis for Quality Control of Distributed Fintech Applica...
User-Assisted Log Analysis for Quality Control of Distributed Fintech Applica...
 
QAFF Chicago 2019 - Complex Post-Trade Systems, Requirements Traceability and...
QAFF Chicago 2019 - Complex Post-Trade Systems, Requirements Traceability and...QAFF Chicago 2019 - Complex Post-Trade Systems, Requirements Traceability and...
QAFF Chicago 2019 - Complex Post-Trade Systems, Requirements Traceability and...
 
QA Community Saratov: Past, Present, Future (2019-02-08)
QA Community Saratov: Past, Present, Future (2019-02-08)QA Community Saratov: Past, Present, Future (2019-02-08)
QA Community Saratov: Past, Present, Future (2019-02-08)
 
Machine Learning and RoboCop Testing
Machine Learning and RoboCop TestingMachine Learning and RoboCop Testing
Machine Learning and RoboCop Testing
 
Behaviour Driven Development: Oltre i limiti del possibile
Behaviour Driven Development: Oltre i limiti del possibileBehaviour Driven Development: Oltre i limiti del possibile
Behaviour Driven Development: Oltre i limiti del possibile
 
2018 - Exactpro Year in Review
2018 - Exactpro Year in Review2018 - Exactpro Year in Review
2018 - Exactpro Year in Review
 
Exactpro Discussion about Joy and Strategy
Exactpro Discussion about Joy and StrategyExactpro Discussion about Joy and Strategy
Exactpro Discussion about Joy and Strategy
 
FIX EMEA Conference 2018 - Post Trade Software Testing Challenges
FIX EMEA Conference 2018 - Post Trade Software Testing ChallengesFIX EMEA Conference 2018 - Post Trade Software Testing Challenges
FIX EMEA Conference 2018 - Post Trade Software Testing Challenges
 
BDD. The Outer Limits. Iosif Itkin at Youcon (in Russian)
BDD. The Outer Limits. Iosif Itkin at Youcon (in Russian)BDD. The Outer Limits. Iosif Itkin at Youcon (in Russian)
BDD. The Outer Limits. Iosif Itkin at Youcon (in Russian)
 

Recently uploaded

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
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
 
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
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
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 pragmaticsAndrey Dotsenko
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
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
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
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
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
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
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 

Recently uploaded (20)

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
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
 
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
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
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
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
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
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
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
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
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
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 

TMPA-2017: Functional Parser of Markdown Language Based on Monad Combining and Monoidal Source Stream Representation

  • 1. functional parser of markdown language based on monad combining and monoidal source stream representation . Georgiy Lukjanov (glukyanov@sfedu.ru) Assistant professor Artem Pelenitsin (apel@sfedu.ru) TMPA conference, 3 Feb 2017 Southern Federal University, Rostov-on-Don, Russia
  • 2. Goals . ∙ Explore approaches to structuring of computation with multiple side-effects provided by modern Haskell libraries 2 / 22
  • 3. Goals . ∙ Explore approaches to structuring of computation with multiple side-effects provided by modern Haskell libraries ∙ Monad Transformers 2 / 22
  • 4. Goals . ∙ Explore approaches to structuring of computation with multiple side-effects provided by modern Haskell libraries ∙ Monad Transformers ∙ Algebraic effects and effects handlers (specifically Extensible Effects) 2 / 22
  • 5. Goals . ∙ Explore approaches to structuring of computation with multiple side-effects provided by modern Haskell libraries ∙ Monad Transformers ∙ Algebraic effects and effects handlers (specifically Extensible Effects) ∙ As a case study, build parsers combinators libraries and restricted Markdown parsers using these approaches 2 / 22
  • 6. Goals . ∙ Explore approaches to structuring of computation with multiple side-effects provided by modern Haskell libraries ∙ Monad Transformers ∙ Algebraic effects and effects handlers (specifically Extensible Effects) ∙ As a case study, build parsers combinators libraries and restricted Markdown parsers using these approaches ∙ Compare these approaches in terms of expressibility and performance 2 / 22
  • 7. Parsers . Informal definition A parser is a program that converts text into some kind of AST (abstract syntax tree) 3 / 22
  • 8. Parsers . Informal definition A parser is a program that converts text into some kind of AST (abstract syntax tree) ∙ Auto-generated, by bottom-up parser generators (YACC) 3 / 22
  • 9. Parsers . Informal definition A parser is a program that converts text into some kind of AST (abstract syntax tree) ∙ Auto-generated, by bottom-up parser generators (YACC) ∙ Manually-written (e.g. top-down recursive descent) 3 / 22
  • 10. Parser Combinators . ∙ Model parsers as higher-order functions map :: (a → b) → [a] → [b] map [ ] = [ ] map f (x : xs) = f x : map f xs 4 / 22
  • 11. Parser Combinators . ∙ Model parsers as higher-order functions map :: (a → b) → [a] → [b] map [ ] = [ ] map f (x : xs) = f x : map f xs ∙ Construct complex parsers from small set of basic ones alphanum :: Parser r Char alphanum = letter <|> digit 4 / 22
  • 12. Parser Combinators . ∙ Model parsers as higher-order functions map :: (a → b) → [a] → [b] map [ ] = [ ] map f (x : xs) = f x : map f xs ∙ Construct complex parsers from small set of basic ones alphanum :: Parser r Char alphanum = letter <|> digit ∙ Mirror grammar rules in source code of the parser 4 / 22
  • 13. Parser as a Monad . Parser data type newtype Parser a = Parser { parse :: String → Maybe (a, String)} 5 / 22
  • 14. Parser as a Monad . Parser data type newtype Parser a = Parser { parse :: String → Maybe (a, String)} Monad instance for Parser instance Monad Parser where return t = Parser $ λs → Just (t, s) m >>= k = Parser $ λs → do (u, v) ← parse m s (x, y) ← parse (k u) v return (x, y) 5 / 22
  • 15. Types and Effects: main notions . ∙ Pure/Impure functions and referential transparency 6 / 22
  • 16. Types and Effects: main notions . ∙ Pure/Impure functions and referential transparency Pure function show :: (Show a) ⇒ a → String 6 / 22
  • 17. Types and Effects: main notions . ∙ Pure/Impure functions and referential transparency Pure function show :: (Show a) ⇒ a → String IO action putStrLn :: String → IO () 6 / 22
  • 18. Types and Effects: main notions . ∙ Static guarantees on computations permissions 7 / 22
  • 19. Types and Effects: main notions . ∙ Static guarantees on computations permissions Computation with static environment readUser :: (MonadReader Database m) ⇒ UserID → m UserData 7 / 22
  • 20. Types and Effects: main notions . ∙ Static guarantees on computations permissions Computation with static environment readUser :: (MonadReader Database m) ⇒ UserID → m UserData ∙ Combining multiple effects 7 / 22
  • 21. Types and Effects: main notions . ∙ Static guarantees on computations permissions Computation with static environment readUser :: (MonadReader Database m) ⇒ UserID → m UserData ∙ Combining multiple effects Static environment and ‘mutable’ state handler :: (MonadReader Config m , MonadState Database m) ⇒ m a 7 / 22
  • 22. Haskell frameworks for effects typing . Monad Transformers — type class based class (Monad m) ⇒ MonadState m where get :: m (StateType m) put :: StateType m → m () newtype StateT s m a = StateT {runStateT :: s → m (a, s)} instance (Monad m) ⇒ MonadState (StateT s m) where get = StateT $ λs → return (s, s) put s = StateT $ _ → return ((), s) instance MonadTrans (StateT s) where ... instance (MonadIO m) ⇒ MonadIO (StateT s m) where ... 8 / 22
  • 23. Haskell frameworks for effects typing . Extensible Effects — free monad based data Free f a where Pure :: a → Free f a Impure :: f (Free f a) → Free f a data State s v where Get :: State s s Put :: !s → State s () instance Functor (State s) type FState s = Free (State s) 9 / 22
  • 24. Parser as a monadic stack . Parser newtype Parser a = Parser (StateT String Maybe a) 10 / 22
  • 25. Parser as a monadic stack . Parser newtype Parser a = Parser (StateT String Maybe a) Running a parser parse :: Parser a → String → Maybe (a, String t) parse (Parser p) s = runStateT p s 10 / 22
  • 26. Parser as a Union of Effects . type Parsable r = (Member Fail r, Member (State String) r) type Parser r a = Parsable r ⇒ Eff r a 11 / 22
  • 27. Parser as a Union of Effects . type Parsable r = (Member Fail r, Member (State String) r) type Parser r a = Parsable r ⇒ Eff r a Running a parser (handling effects) parse :: Eff (Fail ’: State String ’ : [ ]) a → String → (Either () a, String) parse p inp = run $ runState (runError p) inp 11 / 22
  • 28. Basic parsers . Unconditional consumer item :: Parser r Char item = do s ← get case s of [ ] → put s >> die (x : xs) → put xs >> pure x 12 / 22
  • 29. Basic parsers . Unconditional consumer item :: Parser r Char item = do s ← get case s of [ ] → put s >> die (x : xs) → put xs >> pure x Conditional consumer sat :: (Char → Bool) → Parser r Char sat p = do x ← item if p x then return x else die 12 / 22
  • 30. Parsers combinators . Determenistic alternative combinator alt :: Parser r a → Parser r a → Parser r a alt ma mb = do s ← get catchExc ma $ λea → put s >> catchExc mb $ λeb → die 13 / 22
  • 31. Parsers combinators . Determenistic alternative combinator alt :: Parser r a → Parser r a → Parser r a alt ma mb = do s ← get catchExc ma $ λea → put s >> catchExc mb $ λeb → die Repetition combinator many :: Parser r a → Parser r [a] many v = many_v where many_v = some_v ‘alt‘ (pure [ ]) some_v = (fmap (:) v) < ∗ > many_v 13 / 22
  • 32. Restricted Markdown AST . Document type Document = [Block] Block data Block = Blank | Header (Int, Line) | Paragraph [Line] | UnorderedList [Line] | BlockQuote [Line] 14 / 22
  • 33. Constructing AST . Parser for Document doc :: Parser Document doc = many block where block = blank <|> header <|> paragraph <|> unorderdList <|> blockquote <|> blockMath Parser for headers header :: Parser Block header = do hashes ← token $ some $ char ’#’ text ← nonEmptyLine return $ Header (length hashes, text) 15 / 22
  • 34. Performance benchmarks. MTL . Estimate Confidence interval Mean time 121 μs [119 μs, 126 μs] σ 10.0 μs [20.2 μs, 3.84 μs] 16 / 22
  • 35. Performance benchmarks. Freer EE . Estimate Confidence interval Mean time 7.53 ms [7.44 ms, 7.66 ms] σ 289 μs [194 μs, 436 μs] 17 / 22
  • 36. String-like types in Haskell . String Essentially a [Char] — poor performance ByteString High performance, but low-level interface Text Unicode-oriented high performance type 18 / 22
  • 37. Text-oriented Monoids . Input-polymorphic base parser item :: TextualMonoid t ⇒ Parser t Char item = do s ← splitCharacterPrefix ◦ remainder < $ > get case s of Nothing → throwError Just (c, rest) → put rest ∗ > pure c ‘uncons’-like function splitCharacterPrefix :: TextualMonoid t ⇒ t → Maybe (Char, t) 19 / 22
  • 38. Conclusion and results . 1. Parsers combinators library and Markdown parser based on Monad Transformers. ∙ https://github.com/geo2a/markdown_monparsing 2. Parsers combinators library and Markdown parser based on Extensible Effects. ∙ https://github.com/geo2a/ext-effects-parsers ∙ https://github.com/geo2a/ext-effects-markdown 3. Performance comparison of Monad Transformers and Extensible Effects based libraries. 20 / 22
  • 39. References . ∙ Monadic Parser Combinators // Graham Hutton, Erik Meijer – Department of Computer Science, University of Nottingham, 1996 ∙ Adding Structure to Monoids // Mario Blaževic – Stilo International plc ∙ Extensible Effects An Alternative to Monad Transformers // Oleg Kiselyov, Amr Sabry, Cameron Swords – Indiana University, USA ∙ Freer monads and more extensible effects // Oleg Kiselyov, Hiromi Ishii 21 / 22
  • 40. Questions? . Results outline 1. Parsers combinators library and Markdown parser based on Monad Transformers. 2. Parsers combinators library and Markdown parser based on Extensible Effects. 3. Performance comparison of Monad Transformers and Extensible Effects based libraries. Georgiy Lukyanov glukyanov@sfedu.ru Artem Pelenitsin apel@sfedu.ru 22 / 22