The document discusses top-down and bottom-up parsing techniques. Top-down parsing constructs a parse tree starting from the root node and progresses depth-first. It can require backtracking. Bottom-up parsing uses shift-reduce parsing, shifting input symbols onto a stack until they can be reduced based on grammar rules.
The purpose of types:
To define what the program should do.
e.g. read an array of integers and return a double
To guarantee that the program is meaningful.
that it does not add a string to an integer
that variables are declared before they are used
To document the programmer's intentions.
better than comments, which are not checked by the compiler
To optimize the use of hardware.
reserve the minimal amount of memory, but not more
use the most appropriate machine instructions.
The purpose of types:
To define what the program should do.
e.g. read an array of integers and return a double
To guarantee that the program is meaningful.
that it does not add a string to an integer
that variables are declared before they are used
To document the programmer's intentions.
better than comments, which are not checked by the compiler
To optimize the use of hardware.
reserve the minimal amount of memory, but not more
use the most appropriate machine instructions.
The first “L” stands for scanning input from left to right. The second “L” for producing a leftmost derivation. The “1” for using one input symbol of look-ahead at each step to make parsing decisions.
Climbing the Abstract Syntax Tree (Forum PHP 2017)James Titcumb
The new Abstract Syntax Tree (AST) in PHP 7 means the way our PHP code is being executed has changed. Understanding this new fundamental compilation step is key to understanding how our code is being run.
To demonstrate, James will show how a basic compiler works and how introducing an AST simplifies this process. We’ll look into how these magical time-warp techniques* can also be used in your code to introspect, analyse and modify code in a way that was never possible before.
After seeing this talk, you’ll have a great insight as to the wonders of an AST, and how it can be applied to both compilers and userland code.
(*actual magic or time-warp not guaranteed)
Climbing the Abstract Syntax Tree (Midwest PHP 2020)James Titcumb
The new Abstract Syntax Tree (AST) in PHP 7 means the way our PHP code is being executed has changed. Understanding this new fundamental compilation step is key to understanding how our code is being run.
To demonstrate, James will show how a basic compiler works and how introducing an AST simplifies this process. We’ll look into how these magical time-warp techniques* can also be used in your code to introspect, analyse and modify code in a way that was never possible before.
After seeing this talk, you’ll have a great insight as to the wonders of an AST, and how it can be applied to both compilers and userland code.
(*actual magic or time-warp not guaranteed)
Climbing the Abstract Syntax Tree (PHP UK 2018)James Titcumb
The new Abstract Syntax Tree (AST) in PHP 7 means the way our PHP code is being executed has changed. Understanding this new fundamental compilation step is key to understanding how our code is being run. To demonstrate, James will show how a basic compiler works and how introducing an AST simplifies this process. We’ll look into how these magical time-warp techniques* can also be used in your code to introspect, analyse and modify code in a way that was never possible before. After seeing this talk, you'll have a great insight as to the wonders of an AST, and how it can be applied to both compilers and userland code.
(*actual magic or time-warp not guaranteed)
Climbing the Abstract Syntax Tree (Southeast PHP 2018)James Titcumb
The new Abstract Syntax Tree (AST) in PHP 7 means the way our PHP code is being executed has changed. Understanding this new fundamental compilation step is key to understanding how our code is being run.
To demonstrate, James will show how a basic compiler works and how introducing an AST simplifies this process. We’ll look into how these magical time-warp techniques* can also be used in your code to introspect, analyse and modify code in a way that was never possible before.
After seeing this talk, you'll have a great insight as to the wonders of an AST, and how it can be applied to both compilers and userland code.
(*actual magic or time-warp not guaranteed)
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofsAlex Pruden
This paper presents Reef, a system for generating publicly verifiable succinct non-interactive zero-knowledge proofs that a committed document matches or does not match a regular expression. We describe applications such as proving the strength of passwords, the provenance of email despite redactions, the validity of oblivious DNS queries, and the existence of mutations in DNA. Reef supports the Perl Compatible Regular Expression syntax, including wildcards, alternation, ranges, capture groups, Kleene star, negations, and lookarounds. Reef introduces a new type of automata, Skipping Alternating Finite Automata (SAFA), that skips irrelevant parts of a document when producing proofs without undermining soundness, and instantiates SAFA with a lookup argument. Our experimental evaluation confirms that Reef can generate proofs for documents with 32M characters; the proofs are small and cheap to verify (under a second).
Paper: https://eprint.iacr.org/2023/1886
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Welcome to the first live UiPath Community Day Dubai! Join us for this unique occasion to meet our local and global UiPath Community and leaders. You will get a full view of the MEA region's automation landscape and the AI Powered automation technology capabilities of UiPath. Also, hosted by our local partners Marc Ellis, you will enjoy a half-day packed with industry insights and automation peers networking.
📕 Curious on our agenda? Wait no more!
10:00 Welcome note - UiPath Community in Dubai
Lovely Sinha, UiPath Community Chapter Leader, UiPath MVPx3, Hyper-automation Consultant, First Abu Dhabi Bank
10:20 A UiPath cross-region MEA overview
Ashraf El Zarka, VP and Managing Director MEA, UiPath
10:35: Customer Success Journey
Deepthi Deepak, Head of Intelligent Automation CoE, First Abu Dhabi Bank
11:15 The UiPath approach to GenAI with our three principles: improve accuracy, supercharge productivity, and automate more
Boris Krumrey, Global VP, Automation Innovation, UiPath
12:15 To discover how Marc Ellis leverages tech-driven solutions in recruitment and managed services.
Brendan Lingam, Director of Sales and Business Development, Marc Ellis
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™UiPathCommunity
In questo evento online gratuito, organizzato dalla Community Italiana di UiPath, potrai esplorare le nuove funzionalità di Autopilot, il tool che integra l'Intelligenza Artificiale nei processi di sviluppo e utilizzo delle Automazioni.
📕 Vedremo insieme alcuni esempi dell'utilizzo di Autopilot in diversi tool della Suite UiPath:
Autopilot per Studio Web
Autopilot per Studio
Autopilot per Apps
Clipboard AI
GenAI applicata alla Document Understanding
👨🏫👨💻 Speakers:
Stefano Negro, UiPath MVPx3, RPA Tech Lead @ BSP Consultant
Flavio Martinelli, UiPath MVP 2023, Technical Account Manager @UiPath
Andrei Tasca, RPA Solutions Team Lead @NTT Data
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
3. Top Down Parsing
Things to know:
Top down parsing is constructing a parse tree for the input starting from the root and
create nodes of the parse tree in preorder(depth first).
A general form of top down parsing is the recursive descent parsing.
A recursive descent parsing is a top down parsing technique that execute a set of
recursive procedures to process the input, that involves backtracking(means
scanning the input repeatedly).
Backtracking is time consuming and therefore, inefficient. That‟s why a special case
of top down parsing was developed, called predictive parsing, where no
backtracking is required.
A dilemma can occur if there is a left recursive grammar. Even with backtracking, you
can find the parser to go into an infinite loop.
There are two types of recursion, left recursive and right recursive, based on it‟s
name, a left recursive grammar build trees that grows down to the left, while right
recursive is vice versa.
4. Top-down Parse tree of Grammar G(Where input=id):
G= E -> T E‟
E‟-> +T E‟ | ε E E E E
T-> F T‟
T E’ T E’ T E’
T‟-> *F T‟ | ε
F-> (E) | id F T’ F T’
id
An example of a simple production with left recursive grammar
Consider the grammar: expr -> expr + term
This is an example of a left recursive grammar.
Whenever we call expr, the same procedure is called out, and the parser will loop forever.
By carefully writing a grammar, one can eliminate left recursion from it.
expr -> expr + term, can be written as
expr -> expr + term | term
After obtaining a grammar that needs no backtracking, we can use the
PREDICTIVE PARSER
5. Top Down Parsing Techniques
Recursive-Descent Parsing
Predictive Parsing
6. Recursive-Descent
Recursive-Descent Parsing Parsing
A recursive-descent parsing program consists of a set of procedures, one for each
nonterminal. Execution begins with the procedure for the start symbol, which halts
and announces success if its procedure body scans the entire input string.
General recursive-descent may require backtracking; that is, it may require repeated
scans over the input.
Consider the grammar with input string “cad”:
S -> c A d
A -> a b | a
S S S
c A d c A d c A d
a b a
c a d
Back
7. Predictive Parsing-a parsing technique that uses a lookahead symbol to
determine if the current input arguments matches the lookahead symbol.
Construction of
First and
Predictive
Follow
Parsing Tables
LL(1)
Error Recovery
Grammars
8. First and
Follow
First and Follow aids the construction of a predictive parser.
They allow us to fill in the entries of a predictive parsing table.
a is any string of terminals , then First(a) is the set of terminals
that begin the strings derived from a. If a is an empty string(ɛ),
then ɛ is also in First(a).
Follow (A), for a nonterminal A, to be the set of terminals a that
can appear immediately to the right of A in a sentential form.
9. First and
Follow
Rules in computing FIRST (X) where X can be a terminal or nonterminal, or even ε(empty
string).
1) If X is a terminal, then FIRST(X)= X.
2) If X is ε, then FIRST (X) = ε.
3) If X is a nonterminal and Y and Z are nonterminals, with a production of
X -> Y
Y -> Za
Z-> b; then FIRST(X) = b; where FIRST(nonterminal1) -> FIRST(nonterminal2)or until
you reach the first terminal of the production. In that case
(FIRST(nonterminaln) =FIRST(nonterminaln+1))
4) If X is a nonterminal and contains two productions. EX:
X -> a | b; then FIRST (X) = {a , b}
10. First and
Follow
• Consider again grammar G: ANSWERS(FIRST):
1) E -> T E‟ 1) FIRST(E) = FIRST(T) =
E‟ -> +T E‟ | ε FIRST(F) = { ( , id }
T -> F T‟ FIRST (E‟) = { + , ε }
T„ -> *F T‟ | ε FIRST (T) = { *, ε }
F -> ( E ) | id
2) S -> iEtSS‟ | a 2) FIRST(S)= { i , a }
S‟ -> eS | ε FIRST(S‟)= { e, ε }
E -> b FIRST(E) = { b }
11. First and
Follow
Rules in computing FOLLOW ( X) where X is a nonterminal
1) If X is a part of a production and is succeeded by a terminal, for example: A -> Xa; then
Follow(X) = { a }
2) If X is the start symbol for a grammar, for ex:
X -> AB
A -> a
B -> b; then add $ to FOLLOW (X); FOLLOW(X)= { $ }
3) If X is a part of a production and followed by another non terminal, get the FIRST of that
succeeding nonterminal.
ex: A -> XD
D -> aB ; then FOLLOW(X)= FIRST(D) = { a }; and if FIRST(D) contains ε
(ex: D->aB | ε), then everything in FOLLOW(D) is in FOLLOW(X).
4) If X is the last symbol of a production, ex: S -> abX, then
FOLLOW(X)= FOLLOW(S)
12. First and
Follow
• Consider again grammar G: ANSWERS FOR FOLLOW:
1) E -> T E‟ 1) FOLLOW(E) = FOLLOW(E‟)= { ) , $}
E‟ -> +T E‟ | ε FOLLOW (T)= FOLLOW(T‟)= { +, ), $}
T -> F T‟ FOLLOW (F) = { +, * , ), $}
T„ -> *F T‟ | ε
F -> ( E ) | id
2) S -> iEtSS‟ | a 2) FOLLOW (S) = FOLLOW (S‟)={ e, $}
S‟ -> eS | ε FOLLOW(E)= { t }
E -> b
ANSWERS(FIRST):
1) FIRST(E) = FIRST(T) = FIRST(F) = { ( , id }
FIRST (E‟) = { + , ε }
FIRST (T‟) = { *, ε }
2) FIRST(S)= { i , a }; FIRST(S‟)= { e, ε }; FIRST(E) =
{b}
ANSWERS(FOLLOW):
13. Construction of
Predictive
Parsing Tables
The general idea is to use the FIRST AND FOLLOW to
construct the parsing tables.
Each FIRST of every production is labeled in the table
whenever the input matches with it.
When a FIRST of a production contains ε, then we get
the Follow of the production
14. Consider again grammar G:
Construction of E -> T E‟
E‟ -> + T E‟ | ε
Predictive T -> F T‟
Parsing Tables T- -> *FT | ε
F -> ( E ) | id
and their First and Follow
FIRST(E) = FIRST(T) = FIRST(F) = { ( , id } FOLLOW(E) = FOLLOW(E‟)= { ) , $}
FIRST (E‟) = { + , ε } FOLLOW (T)= FOLLOW(T‟)= { +, ), $}
FIRST (T‟) = { *, ε } FOLLOW (F) = { +, * , ), $}
Nontermi
nals
Id + * ( ) $
E E->TE‟ E->TE‟
E‟ E‟->+TE‟ E‟->ε E‟->ε
T T->FT‟ T-FT‟
T‟ T‟-> ε T‟->*FT‟ T‟->ε T‟->ε
F F-> id F->(E)
15. Nontermin Id + ( ) $
als *
E E->TE‟ E->TE‟
E‟ E‟->+TE‟ E‟->ε E‟->ε
T T->FT‟ T->FT‟
T‟ T‟-> ε T‟->*FT‟ T‟->ε T‟->ε
F F-> id F->(E)
STACK INPUT ACTION
$E id + id * id $
$E‟T id + id * id $ E->TE‟
$E‟T‟F id + id * id $ T->FT‟
$E‟T‟id id + id * id $ F-> id
$E‟T‟ + id * id $
$E‟ + id * id $ T‟-> ε
$E‟T + + id * id $ E‟->+TE‟
$E‟T id * id $
$E‟T‟F id * id $ T->FT‟
$E‟T‟id id * id $ F-> id
$E‟T‟ * id $
$E‟T‟F* * id $ T‟->*FT‟
$E‟T‟F id $
$E‟T‟id id $ F-> id
$E‟T‟ $
$E‟ $ Back
T‟->ε
$ $ E‟->ε
16. LL(1)
Grammars
• What does LL(1) mean?
The first “L” in LL(1) stands for scanning the input from left to right, the second “L”
is for producing a leftmost derivation, and the “1” for using one input symbol of
lookahead at each step to make parsing action decisions.
No ambiguous or left recursive grammar is LL(1).
17. LL(1)
Grammars
There remains a question of what should be done when a parsing table has
multiple-defined entries.
One solution is to transform the grammar by eliminating all left recursion and then
left factoring when possible, but not all grammars can yield an LL(1) grammar
at all.
The main difficulty in using a predictive parsing is in writing a grammar for the
source language such that a predictive parser can be constructed from the
grammar.
To alleviate some of the difficulty, one can use a operator precedence, or even
better the LR parser, that provides both the benefits of predictive parsing and
operator precedence automatically.
BACK
18. Error Recovery
When does an error possibly occur?
-An error is detected when the terminal on the top of the stack
does not match the next input symbol or when the
nonterminal A is on the top of the stack, a is the next input
symbol, and the parsing table entry M[A, a] is empty.
How can we deal with errors?
Panic-mode error recovery is based on the idea of skipping
symbols on the input until a token in a selected set of synch
tokens appears.
19. Error Recovery
How does it work?
Using follow and first symbols as synchronizing tokens works
well. The parsing table will be filled with “synch” tokens
obtained from the FOLLOW set of the nonterminal.
When a parser looks up entry M[A,a] and finds it blank, then a
is skipped. If the entry is “synch”, then the nonterminal is
popped in an attempt to resume parsing.
20. Nontermin Id + ( ) $
als *
E E->TE‟ E->TE‟ synch synch
E‟ E‟->+TE‟ E‟->ε E‟->ε
T T->FT‟ synch T->FT‟ synch synch
T‟ T‟-> ε T‟->*FT‟ T‟->ε T‟->ε
F STACK id
F-> synch synch
INPUT F->(E) ACTIONsynch
synch
$E ) id * + id $ Error, skip )
$E id * + id $ Id is in FIRST(E)
$E‟ T id * + id $
$E‟ T‟F id * + id $
$E‟ T‟id id * + id $
$E‟ T‟ * + id $
$E‟ T‟ F * * + id $
$E‟ T‟ F + id $ Error, M[F, +1 = synch
$E‟ T‟ + id $ F has been popped
$E‟ + id $
$E‟ T+ + id $
$E‟ T id $
$E‟ T‟ F id $
$E‟ T‟ id id $
$E‟T‟ $
$E‟ $
$ $
Back
21. Error Recovery
• Another error recovery procedure is the Phrase-level
Recovery. This is implemented by filling in the blank entries
in the parsing table with pointers to error routines. These
routines can also pop symbols from the stack, change,
insert or delete symbols on the input, and issue
appropriate error messages. The alteration of stack
symbols is very questionable and risky.
BACK
22. Bottom Up Parsing
A general style of bottom up parsing will be introduced, it is
the shift-reduce parsing.
Shift reduce parsing works based on its name, “Shift” and
“Reduce”, so whenever the stack holds symbols that
cannot be reduced anymore, we shift another input, and
when it matches, we reduce.
23. Bottom Up Parsing
STACK INPUT ACTION
1) $ id1 + id2 * id3 $ Shift
2) $id1 + id2 * id3 $ Reduce by E -
3) $E + id2 * id3 $ >id
4) $E + id2 * id3 $ Shift
5) $E + id2 * id3 $ Shift
6) $E + E * id3 $ Reduce by E->id
7) $E + E * id3 $ Shift
8) $E + E * id3 $ Shift
9) $E + E * E $ Reduce by E->id
10)$E + E $ Reduce by E-> E * E
11)$E $ Reduce by E-> E+ E
ACCEPT