Three years ago I started working on my PhD project, under FCT's grant SFRH/BD/19186/2004.
I've been working under the supervision of João Saraiva (University if Minho) and Oege de Moor (University of Oxford).
With this PhD project, named "Embedded Attribute Grammars", we propose to develop techniques and tools for the
embedding of Attribute Grammars in a modern, lazy functional language. In particular, we want to study techniques
to embed recent developments in AGs, namely, aspects (aspect-oriented programming), references (imperative
programming), multiple inheritance (object oriented programming), strategies (strategic programming) and
incremental attribute evaluation (incremental computation).
Yet, Attribute Grammars are also suitable to expresse incremental algorithms. Indeed, there are well known
techniques to automatically derive incremental, strict attribute evaluators from an attribute grammar. The
techniques developed until now, however, do not consider lazy evaluation. We want to study techniques to merge
lazy and incremental evaluation.
This PhD research project is to be carried out in the Department of Informatics as Minho University and at Oxford
Computing Laboratory, Oxford University.
University of Minho 's Scholar Merit Award
Awarded by the University of Minho to students that are approved in all courses of a school year with an average score of over 14/20.
2004
Portuguese Ministry of Education 's merit scholarship
Awarded by the Portuguese Ministry of Education to the best 5 students concluding an undergraduate degree within the Scientific Area of Sciences.
2005
University of Minho 's Student Excelency Award
Awarded by the University of Minho for having concluded the undergraduate degree with the highest average score of my class.
The CircLib? library is a Haskell based library that implements the schedulling of circular definitions.
This library implements an adaptation of Kasten's attribute scheduling algorithm to circular programs. The basic idea is that, if a circular program is an ordered circular program, it exists an alternative way to produce the same results produced by the circular program.
The adaptation we propose for Kasten's algorithm also determines this alternative way of producing results.
The complete documentation for this library may be found here.
HaCirc is an Haskell refactor. It refactors circular programs into its strict counterpart. The tool accepts, as input, Haskell circular programs and produces, as output, strict Haskell programs. Furthermore, it is also possible to obtain strict programs that use no explicit intermediate data structure.
HaCirc is also a circular programs' slicer. Indeed, the tool is able to compute circular programs' slices, which can be obtained in three different programming styles: again as circular programs, as multiple traversal strict programs that use intermediate data structures and as deforested programs (i.e., programs with no intermediate, traversal gluing, structures).
There are two versions of the HaCirc tool:
a batch tool that given as input a circular Haskell program generates in the output its strict Haskell program. This version is is available for download and use here (instalation instructions inside).
a web-based interactive tool that allows HaCirc to be used online. No prior instalation is needed to give the HaCirc tool a try, online!
Benchmarks
We have performed some benchmarks on the different implementations of circular programs, using a realistic example: processing the MicroC language, a small subset of the C language.
The memory profilings obtained are presented here.
During my degree internship I was to study, among other things, Parser techniques and algorithms.
Under this goal, we (me and my internship supervisor, João Saraiva)
found out that, surprisingly, little work had been done on Generalised LR parsing by the functional programming community.
Given so, we (with Joost Visser's cooperation) embarked on a challenging
aproach: to provide GLR support directly in Haskell.
In fact, the popularity of Generalised Parsing is growing since it is able to solve many problems that are common on other technologies
based on LL and LR algorithms, and since it is able to handle both real programming languages and domain specific languages.
Our work resulted on the development of the HaGLR tool, a Generalised LR parser generator.
GLR's motivations and HaGLR's implementation and development options,
as well as achieved results and performance benchmarks are much better detailed in DI-PURe-04.11.01.pdf's Technical Report.
The tool itself is free for download and use, available as part of the
UMinho Haskell Software.
This internship project occurred under the PURe project.
One of my major research interest subjects is Adaptive and Incremental computation.
An adaptive computation maintains the relationship between its input
and output as the input changes.
That is to say that output will be updated
as response to input changes, while re-evaluation will only occur on
program portions afected by the change. Adaptive programming is most
useful in situations where input changes lead to relatively small changes in
the output.
In limiting cases one cannot avoid a complete re-computation
of the output, but in many cases the results of the previous computation
may be re-used to obtain the updated output more quickly than a complete
re-evaluation.
We are using Magnus Carlsson Adaptive Combinators library to model,
in Haskell, a real spreadsheet adaptive system. This is, in fact, one of the
classical incremental computation problems.
Magnus Carlsson's Haskell library for incremental computing, by its hand,
follows closely the implementation in the POPL 2002 paper "Adaptive
Functional Programming", by Umut Acar, Guy Blelloch and Bob Harper.
For detailed information on the building of the Incremental Interpreter,
please take a look at this brief documentation report.
If you want to actually run the interpreter, you will need this (non-hierarchical)
small library, plus Language.Gnumeric UMinho Haskell library, HaXml
and Magnus Carlsson Haskell library.
The OCirc tool
is a tool that allows OCaml programmers to express their multiple traversal programs as circular programs. This tool transforms circular programs written in Ocaml notation, into correct strict Ocaml programs.
There are two versions of the OCirc tool:
a batch tool that given as input a circular OCaml program generates in the output its strict OCaml program. This version is downloadable here (instalation requirements and instructions included).
a web-based interactive tool that allows OCirc to be used online. Please try it out here.
As for cultural enhancement, I just wish I had more money to go to the cinema,
to the theatre, to music concerts!
If I had free time, I also would read more books...
João Paulo Fernandes, João Saraiva PEPM '07 Proceedings of the 2007 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation, 2007
2004
Generalized LR Parsing in Haskell, João Paulo Fernandes, João Saraiva and Joost Visser, in
Informal Proceedings of the Summer School on Advanced Functional Programming, students' presentation, pages 24-37, University of Tartu, August
Generalized LR Parsing, João Paulo Fernandes, PURe Project Technical Report DI-PURe-04.11.01
I have:
- coordinated the Software Technologies and Software Languages Summer School (SoTeSoLa) working group on data-driven technological spaces, with a contributed talk on Spreadsheets as a Programming Paradigm, August 2012.
Circular Programs were first proposed by Richard Bird as an elegant and efficient technique to eliminate multiple traversal of data structures.
More detailed information about Circular Programs may be found here.
We have developed the following approaches to circular programming:
CircLib : an Haskell based library that implements the scheduling of circular definitions.
This library can be reused to build a full Haskell -based attribute grammar system.
It is also the building block for the two developed tools:
OCirc : a (prototype) tool for the strictification of lazy circular Ocaml programs (online testing available (best displayed in firefox)).
HaCirc : a (prototype) tool for the strictification and slicing of lazy circular Haskell programs (online testing available (best displayed in firefox)).
We are working on the following articles on circular programming:
Circular Programs were first proposed by Richard Bird as an elegant and efficient technique to eliminate multiple traversal of data structures.
As the name suggests, Circular Programs are characterized by having what appears to be a circular definition: arguments in a function call depend on results of that same call. That is, they contain definitions of the form:
(...,x,...) = f ... x ...
In order to motivate the use of circular programs, Bird introduces the following problem: consider the problem of transforming a binary leaf tree into a second tree, identical in shape to the original one, but with all the tip values replaced by the minimum tip value.
An instance of such a problem is presented next.
The input tree
The output tree
In a strict and purely functional setting, solving this problem would require a two traversal strategy: the first traversal would compute the original tree's minimum value, and the second traversal would replace all the tip values by the minimum value, therefore producing the desired result.
However, a two traversal strategy is not essential to solve the repmin problem. An alternative solution can, on a single traversal, compute the minimum tip value and, at the same time, replace all tip values by that minimum value.
Bird also showed a program transformation technique to derive circular programs from the straightforward strict, multiple traversal solutions.
The Haskell circular program that solves the repmin problem is presented next.
data R = RootProd Tree
data Tree = Tip Int
| Fork Tree Tree
repmin (RootProd t) = replace
where (replace,m) = repmin_aux (t, m)
repmin_aux (Tip n, minIn) = (replace, m)
where replace = Tip minIn
m = n
repmin_aux (Fork t1 t2, minIn) = (replace, m)
where replace = Fork replace1 replace2
m = min m1 m2
(replace1, m1) = repmin_aux (t1, minIn)
(replace2, m2) = repmin_aux (t2, minIn)
Notice that, on the above program's call:
(replace,m) = repmin_aux (t, m)
the variable
m
is both an argument and a result of the call.
This type of circular definitions are directly executable on lazy languages only.
I have: coordinated the Software Technologies and Software Languages Summer School (working group on data driven technological spaces, with a contributed http ...
Activities: I have served/will serve: in the Program Comittee for the following conferences: 22nd ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation ...
Publications 2012 and Implementation of ClassSheet Models , Jácome Cunha, João Paulo Fernandes, Jorge Mendes, João Saraiva. In the Proceedings of the IEEE Symposium ...
Research Projects: Foundations, Applications and Tools for Bidirectional Transformations, FCT funded, 2011 ... Bidirectional Transformations Applied to Programming ...
Awards and Distinctions 99/00 , 00/01 , 01/02 , 02/03 University of Minho 's Scholar Merit Award Awarded by the University of Minho to students that ...
The HaCirc tool HaCirc is an Haskell refactor. It refactors circular programs into its strict counterpart. The tool accepts, as input, Haskell circular programs ...
The OCirc tool The OCirc tool is a tool that allows OCaml programmers to express their multiple traversal programs as circular programs. This tool transforms circular ...
The HaGLR tool During my degree internship I was to study, among other things, Parser techniques and algorithms. Under this goal, we (me and my internship supervisor ...
HaGLR A Haskell based Generalized LR Parser Generator and Grammar Interpreter HaCirc Strictification and Slicing of lazy Circular Haskell Programs OCirc ...
Personal/Joao Web Preferences The following settings are web preferences of the Personal/Joao web. These preferences overwrite the site level preferences in ...
PhD Program Three years ago I started working on my PhD project, under FCT's grant SFRH/BD/19186/2004 . I've been working under the supervision of João Saraiva (University ...
Circular Functional Programming Circular Programs were first proposed by Richard Bird as an elegant and efficient technique to eliminate multiple traversal of data ...
The CircLib library The CircLib library is a Haskell based library that implements the schedulling of circular definitions. This library implements an adaptation ...
Circular Programs Circular Programs were first proposed by Richard Bird as an elegant and efficient technique to eliminate multiple traversal of data structures. As ...
Incremental Spreadsheet Interpreter One of my major research interest subjects is Adaptive and Incremental computation. An adaptive computation maintains the relationship ...
This is a subscription service to be automatically notified by e mail when topics change in this Personal/Joao web. This is a convenient service, so you do not have ...
PhD Program Three years ago I started working on my PhD project, under FCT's grant SFRH/BD/19186/2004 . I've been working under the supervision of João Saraiva (University ...
Activities: I have served/will serve: in the Program Comittee for the following conferences: 22nd ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation ...
Awards and Distinctions 99/00 , 00/01 , 01/02 , 02/03 University of Minho 's Scholar Merit Award Awarded by the University of Minho to students that ...
The CircLib library The CircLib library is a Haskell based library that implements the schedulling of circular definitions. This library implements an adaptation ...
The HaCirc tool HaCirc is an Haskell refactor. It refactors circular programs into its strict counterpart. The tool accepts, as input, Haskell circular programs ...
The HaGLR tool During my degree internship I was to study, among other things, Parser techniques and algorithms. Under this goal, we (me and my internship supervisor ...
Incremental Spreadsheet Interpreter One of my major research interest subjects is Adaptive and Incremental computation. An adaptive computation maintains the relationship ...
The OCirc tool The OCirc tool is a tool that allows OCaml programmers to express their multiple traversal programs as circular programs. This tool transforms circular ...
Research Projects: Foundations, Applications and Tools for Bidirectional Transformations, FCT funded, 2011 ... Bidirectional Transformations Applied to Programming ...
Publications 2012 and Implementation of ClassSheet Models , Jácome Cunha, João Paulo Fernandes, Jorge Mendes, João Saraiva. In the Proceedings of the IEEE Symposium ...
I have: coordinated the Software Technologies and Software Languages Summer School (working group on data driven technological spaces, with a contributed http ...
HaGLR A Haskell based Generalized LR Parser Generator and Grammar Interpreter HaCirc Strictification and Slicing of lazy Circular Haskell Programs OCirc ...
Circular Functional Programming Circular Programs were first proposed by Richard Bird as an elegant and efficient technique to eliminate multiple traversal of data ...
Circular Programs Circular Programs were first proposed by Richard Bird as an elegant and efficient technique to eliminate multiple traversal of data structures. As ...
This is a subscription service to be automatically notified by e mail when topics change in this Personal/Joao web. This is a convenient service, so you do not have ...
Personal/Joao Web Preferences The following settings are web preferences of the Personal/Joao web. These preferences overwrite the site level preferences in ...
This is a subscription service to be automatically notified by e-mail when topics change in this Personal/Joao web. This is a convenient service, so you do not have to come back and check all the time if something has changed. To subscribe, please add a bullet with your TWiki.WikiName in alphabetical order to this list:
Each TWiki web has an automatic e-mail notification service that sends you an e-mail with links to all of the topics modified since the last alert.
Users subscribe to email notifications using their TWiki.WikiName or an alternative email address, and can specify the webs/topics they wish to track using one of these bullet list formats:
three spaces * [ webname . ] wikiName - SMTP mail address three spaces * [ webName . ] wikiName three spaces * SMTP mail address three spaces * SMTP mail address : topics three spaces * [ webname . ] wikiName : topics
In the above examples, topics is a space-separated list of topic names. The user may further customize the specific content they will receive using the following formats:
Specify topics without a Web. prefix
Topics must exist in this web.
Topics may be specified using * wildcards
Each topic may optionally be preceded by a '+' or '-' sign. The '+' sign means "subscribe to this topic" (the same as not putting anything). The '-' sign means "unsubscribe" or "don't send notifications regarding this topic". This allows users to elect to filter out certain topics (and their children, to an arbitrary depth). Topic filters ('-') take precedence over topic includes ('+').
Each topic may optionally be followed by an integer in parentheses, indicating the depth of the tree of children below that topic. Changes in all these children will be detected and reported along with changes to the topic itself. Note This uses the TWiki "Topic parent" feature.
Each topic may optionally be immediately followed by an exclamation mark ! or a question mark ? with no intervening spaces, indicating that the topic (and children if there is a tree depth specifier as well) should be mailed out as complete topics instead of change summaries. ! causes the topic to be mailed every time even if there have been no changes, ? will mail the topic only if there have been changes to it. This only makes sense for subscriptions.
For example:
Subscribe Daisy to all changes to topics in this web.
* daisy.cutter@flowers.com
Subscribe Daisy to all changes in all webs that start with Web.
* daisy.cutter@flowers.com: Web*
Subscribe Daisy to changes to topics starting with Petal, and their immediate children, WeedKillers and children to a depth of 3, and all topics that match start with Pretty and end with Flowers e.g. PrettyPinkFlowers
Subscribe Daisy to the full content of NewsLetter whenever it has changed
* daisy@flowers.com: TWiki.NewsLetter?
Subscribe buttercup to NewsLetter and its immediate children, even if it hasn't changed.
* buttercup@flowers.com: TWiki.NewsLetter! (1)
Subscribe GardenGroup (which includes Petunia) to all changed topics under AllnewsLetters to a depth of 3. Then unsubscribe Petunia from the ManureNewsLetter, which she would normally get as a member of TWiki.GardenGroup:
A user may be listed many times in the WebNotify topic. Where a user has several lines in WebNotify that all match the same topic, they will only be notified about changes that topic once (though they will still receive individual mails for news topics).
If a TWiki group is listed for notification, the group will be recursively expanded to the e-mail addresses of all members.
Tip: List names in alphabetical order to make it easier to find the names.
Note for System Administrators: Notification is supported by an add-on to the TWiki kernel called the MailerContrib. See the TWiki.MailerContrib topic for details of how to set up this service.
Note: If you prefer a news feed, point your reader to Personal/Joao.WebRss (for RSS 1.0 feeds) or Personal/Joao.WebAtom (for ATOM 1.0 feeds). Learn more at TWiki.WebRssBase and TWiki.WebAtomBase, respectively.
Related topics: TWiki.WebChangesAlert, Main.TWikiUsers, TWiki.TWikiRegistration
The following settings are web preferences of the Personal.Joao web. These preferences overwrite the site-level preferences in TWiki.TWikiPreferences, and can be overwritten by user preferences (your personal topic, eg: Main.TWikiGuest in the Main web).
Preferences:
Set WEBTITLE = João Fernandes
List of topics of the TWiki.Personal/Joao web:
Web specific background color: (Pick a lighter one of the TWiki.StandardColors)
Set WEBBGCOLOR = #3366CC
List this web in the TWiki.SiteMap:
If yes, set SITEMAPLIST to on, do not set NOSEARCHALL, and add the "what" and "use to..." description for the site map. Make sure to list only links that include the name of the web, e.g. Personal/Joao.Topic links.
Set SITEMAPLIST = on
Set SITEMAPWHAT = João Fernandes
Set SITEMAPUSETO = ...collaborate on
Exclude web from a web="all" search: (Set to on for hidden webs)
Set NOSEARCHALL =
Prevent automatic linking of WikiWords and acronyms (if set to on); link WikiWords (if empty); can be overwritten by web preferences:
Set NOAUTOLINK = on
Note: Use the [[...][...]] syntax to link topics in case you disabled WikiWord linking. The <noautolink> ... </noautolink> syntax can be used to prevents links within a block of text.
Default template for new topics and form(s) for this web:
WebTopicEditTemplate: Default template for new topics in this web. (Site-level is used if topic does not exist)
A preference is defined as: 6 spaces * Set NAME = value Example:
Set WEBBGCOLOR = #FFFFC0
Preferences are used as TWiki.TWikiVariables by enclosing the name in percent signs. Example:
When you write variable %WEBBGCOLOR% , it gets expanded to #3366CC .
The sequential order of the preference settings is significant. Define preferences that use other preferences first, i.e. set WEBCOPYRIGHT before WIKIWEBMASTER since %WEBCOPYRIGHT% uses the %WIKIWEBMASTER% variable.
You can introduce new preferences variables and use them in your topics and templates. There is no need to change the TWiki engine (Perl scripts).
Related Topics:
TWiki.TWikiPreferences has site-level preferences.
Main.TWikiUsers has a list of user topics. User topics can have optional user preferences.
TWiki.TWikiVariables has a list of common %VARIABLES%.
TWiki.TWikiAccessControl explains how to restrict access by users or groups.
TWiki's Personal/Joao web
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao
The Personal/Joao web of TWiki. TWiki is a Web-Based Collaboration Platform for the Corporate World.en-usCopyright 2020 by contributing authorsTWiki Administrator [webmaster@di.uminho.pt]The contributing authors of TWikiTWikiDIUM.Personal/Joao
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao
/twiki/pub/Main/LocalLogos/um_eengP.jpgWebSideBar
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/WebSideBar
(last changed by JoaoFernandes)2012-10-14T18:46:41ZJoaoFernandesWebHome
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/WebHome
Name: João Paulo Fernandes Email: jpaulo AT di DOT uminho DOT pt Address: Departamento de Informática, ... (last changed by JoaoFernandes)2012-10-14T18:42:05ZJoaoFernandes--TwikiJoaoTalks
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/--TwikiJoaoTalks
I have: coordinated the Software Technologies and Software Languages Summer School (working group on data driven technological spaces, with a contributed http ... (last changed by JoaoFernandes)2012-09-24T14:02:50ZJoaoFernandes--TwikiJoaoActivities
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/--TwikiJoaoActivities
Activities: I have served/will serve: in the Program Comittee for the following conferences: 22nd ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation ... (last changed by JoaoFernandes)2012-09-20T09:39:18ZJoaoFernandes--TwikiJoaoPublications
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/--TwikiJoaoPublications
Publications 2012 and Implementation of ClassSheet Models , Jácome Cunha, João Paulo Fernandes, Jorge Mendes, João Saraiva. In the Proceedings of the IEEE Symposium ... (last changed by JoaoFernandes)2012-09-20T09:24:38ZJoaoFernandes--TwikiJoaoSupervision
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/--TwikiJoaoSupervision
Supervision: Together with Saraiva I co supervise the PhD program of Msc. Martins with title Zippers based embedding of Attribute Grammars . (last changed by JoaoFernandes)2012-09-10T20:47:10ZJoaoFernandes--TwikiJoaoProjects
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/--TwikiJoaoProjects
Research Projects: Foundations, Applications and Tools for Bidirectional Transformations, FCT funded, 2011 ... Bidirectional Transformations Applied to Programming ... (last changed by JoaoFernandes)2012-06-21T11:20:21ZJoaoFernandes--TwikiJoaoAwards
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/--TwikiJoaoAwards
Awards and Distinctions 99/00 , 00/01 , 01/02 , 02/03 University of Minho 's Scholar Merit Award Awarded by the University of Minho to students that ... (last changed by JoaoFernandes)2011-09-22T13:31:05ZJoaoFernandesMenuTopics
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/MenuTopics
http://wiki.di.uminho.pt/wiki/bin/view/PURe/WebHome PURe project Publications Projects Tools Awards and Distinctions (last changed by JoaoFernandes)2010-12-10T15:24:07ZJoaoFernandesPoint
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/Point
(last changed by JoaoFernandes)2009-12-16T20:27:01ZJoaoFernandes--TwikiJoaoHaCirc
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/--TwikiJoaoHaCirc
The HaCirc tool HaCirc is an Haskell refactor. It refactors circular programs into its strict counterpart. The tool accepts, as input, Haskell circular programs ... (last changed by JoaoFernandes)2009-09-02T17:38:34ZJoaoFernandes--TwikiJoaoOCirc
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/--TwikiJoaoOCirc
The OCirc tool The OCirc tool is a tool that allows OCaml programmers to express their multiple traversal programs as circular programs. This tool transforms circular ... (last changed by JoaoFernandes)2009-02-19T11:45:07ZJoaoFernandes--TwikiJoaoOthers
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/--TwikiJoaoOthers
Other Interests As for recreation, my main sport hobbies are: indoor soccer waterpolo jogging swimming As for cultural enhancement, I just wish ... (last changed by JoaoFernandes)2008-12-18T16:10:31ZJoaoFernandes--TwikiJoaoHaGLR
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/--TwikiJoaoHaGLR
The HaGLR tool During my degree internship I was to study, among other things, Parser techniques and algorithms. Under this goal, we (me and my internship supervisor ... (last changed by JoaoFernandes)2008-12-05T11:57:07ZJoaoFernandes--TwikiJoaoTools
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/--TwikiJoaoTools
HaGLR A Haskell based Generalized LR Parser Generator and Grammar Interpreter HaCirc Strictification and Slicing of lazy Circular Haskell Programs OCirc ... (last changed by JoaoFernandes)2008-12-05T11:56:02ZJoaoFernandes--TwikiJoaoTemp
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/--TwikiJoaoTemp
JoaoFernandes 25 Sep 2008 JoaoFernandesCV.pdf: Curriculum Vitae proposal.pdf: PosDocProposal (last changed by JoaoFernandes)2008-09-25T17:58:10ZJoaoFernandes
Three years ago I started working on my TWiki.PhD project, under FCT's grant SFRH/BD/19186/2004.
I've been working under the supervision of João Saraiva (University if Minho) and Oege de Moor (University of Oxford).
With this TWiki.PhD project, named "Embedded Attribute Grammars", we propose to develop techniques and tools for the
embedding of Attribute Grammars in a modern, lazy functional language. In particular, we want to study techniques
to embed recent developments in AGs, namely, aspects (aspect-oriented programming), references (imperative
programming), multiple inheritance (object oriented programming), strategies (strategic programming) and
incremental attribute evaluation (incremental computation).
Yet, Attribute Grammars are also suitable to expresse incremental algorithms. Indeed, there are well known
techniques to automatically derive incremental, strict attribute evaluators from an attribute grammar. The
techniques developed until now, however, do not consider lazy evaluation. We want to study techniques to merge
lazy and incremental evaluation.
This TWiki.PhD research project is to be carried out in the Department of Informatics as Minho University and at Oxford
Computing Laboratory, Oxford University.
University of Minho 's Scholar Merit Award
Awarded by the University of Minho to students that are approved in all courses of a school year with an average score of over 14/20.
2004
Portuguese Ministry of Education 's merit scholarship
Awarded by the Portuguese Ministry of Education to the best 5 students concluding an undergraduate degree within the Scientific Area of Sciences.
2005
University of Minho 's Student Excelency Award
Awarded by the University of Minho for having concluded the undergraduate degree with the highest average score of my class.
The CircLib? library is a Haskell based library that implements the schedulling of circular definitions.
This library implements an adaptation of Kasten's attribute scheduling algorithm to circular programs. The basic idea is that, if a circular program is an ordered circular program, it exists an alternative way to produce the same results produced by the circular program.
The adaptation we propose for Kasten's algorithm also determines this alternative way of producing results.
The complete documentation for this library may be found here.
HaCirc is an Haskell refactor. It refactors circular programs into its strict counterpart. The tool accepts, as input, Haskell circular programs and produces, as output, strict Haskell programs. Furthermore, it is also possible to obtain strict programs that use no explicit intermediate data structure.
HaCirc is also a circular programs' slicer. Indeed, the tool is able to compute circular programs' slices, which can be obtained in three different programming styles: again as circular programs, as multiple traversal strict programs that use intermediate data structures and as deforested programs (i.e., programs with no intermediate, traversal gluing, structures).
There are two versions of the HaCirc tool:
a batch tool that given as input a circular Haskell program generates in the output its strict Haskell program. This version is is available for download and use here (instalation instructions inside).
a web-based interactive tool that allows HaCirc to be used online. No prior instalation is needed to give the HaCirc tool a try, online!
Benchmarks
We have performed some benchmarks on the different implementations of circular programs, using a realistic example: processing the MicroC language, a small subset of the C language.
The memory profilings obtained are presented here.
During my degree internship I was to study, among other things, Parser techniques and algorithms.
Under this goal, we (me and my internship supervisor, João Saraiva)
found out that, surprisingly, little work had been done on Generalised LR parsing by the functional programming community.
Given so, we (with Joost Visser's cooperation) embarked on a challenging
aproach: to provide GLR support directly in Haskell.
In fact, the popularity of Generalised Parsing is growing since it is able to solve many problems that are common on other technologies
based on LL and LR algorithms, and since it is able to handle both real programming languages and domain specific languages.
Our work resulted on the development of the HaGLR tool, a Generalised LR parser generator.
GLR's motivations and HaGLR's implementation and development options,
as well as achieved results and performance benchmarks are much better detailed in DI-PURe-04.11.01.pdf's Technical Report.
The tool itself is free for download and use, available as part of the
UMinho Haskell Software.
This internship project occurred under the PURe project.
One of my major research interest subjects is Adaptive and Incremental computation.
An adaptive computation maintains the relationship between its input
and output as the input changes.
That is to say that output will be updated
as response to input changes, while re-evaluation will only occur on
program portions afected by the change. Adaptive programming is most
useful in situations where input changes lead to relatively small changes in
the output.
In limiting cases one cannot avoid a complete re-computation
of the output, but in many cases the results of the previous computation
may be re-used to obtain the updated output more quickly than a complete
re-evaluation.
We are using Magnus Carlsson Adaptive Combinators library to model,
in Haskell, a real spreadsheet adaptive system. This is, in fact, one of the
classical incremental computation problems.
Magnus Carlsson's Haskell library for incremental computing, by its hand,
follows closely the implementation in the POPL 2002 paper "Adaptive
Functional Programming", by Umut Acar, Guy Blelloch and Bob Harper.
For detailed information on the building of the Incremental Interpreter,
please take a look at this brief documentation report.
If you want to actually run the interpreter, you will need this (non-hierarchical)
small library, plus Language.Gnumeric UMinho Haskell library, HaXml
and Magnus Carlsson Haskell library.
The OCirc tool
is a tool that allows OCaml programmers to express their multiple traversal programs as circular programs. This tool transforms circular programs written in Ocaml notation, into correct strict Ocaml programs.
There are two versions of the OCirc tool:
a batch tool that given as input a circular OCaml program generates in the output its strict OCaml program. This version is downloadable here (instalation requirements and instructions included).
a web-based interactive tool that allows OCirc to be used online. Please try it out here.
As for cultural enhancement, I just wish I had more money to go to the cinema,
to the theatre, to music concerts!
If I had free time, I also would read more books...
João Paulo Fernandes, João Saraiva PEPM '07 Proceedings of the 2007 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation, 2007
2004
Generalized LR Parsing in Haskell, João Paulo Fernandes, João Saraiva and Joost Visser, in
Informal Proceedings of the Summer School on Advanced Functional Programming, students' presentation, pages 24-37, University of Tartu, August
Generalized LR Parsing, João Paulo Fernandes, PURe Project Technical Report DI-PURe-04.11.01
I have:
- coordinated the Software Technologies and Software Languages Summer School (SoTeSoLa) working group on data-driven technological spaces, with a contributed talk on Spreadsheets as a Programming Paradigm, August 2012.
Circular Programs were first proposed by Richard Bird as an elegant and efficient technique to eliminate multiple traversal of data structures.
More detailed information about Circular Programs may be found here.
We have developed the following approaches to circular programming:
CircLib : an Haskell based library that implements the scheduling of circular definitions.
This library can be reused to build a full Haskell -based attribute grammar system.
It is also the building block for the two developed tools:
OCirc : a (prototype) tool for the strictification of lazy circular Ocaml programs (online testing available (best displayed in firefox)).
HaCirc : a (prototype) tool for the strictification and slicing of lazy circular Haskell programs (online testing available (best displayed in firefox)).
We are working on the following articles on circular programming:
Circular Programs were first proposed by Richard Bird as an elegant and efficient technique to eliminate multiple traversal of data structures.
As the name suggests, Circular Programs are characterized by having what appears to be a circular definition: arguments in a function call depend on results of that same call. That is, they contain definitions of the form:
(...,x,...) = f ... x ...
In order to motivate the use of circular programs, Bird introduces the following problem: consider the problem of transforming a binary leaf tree into a second tree, identical in shape to the original one, but with all the tip values replaced by the minimum tip value.
An instance of such a problem is presented next.
The input tree
The output tree
In a strict and purely functional setting, solving this problem would require a two traversal strategy: the first traversal would compute the original tree's minimum value, and the second traversal would replace all the tip values by the minimum value, therefore producing the desired result.
However, a two traversal strategy is not essential to solve the repmin problem. An alternative solution can, on a single traversal, compute the minimum tip value and, at the same time, replace all tip values by that minimum value.
Bird also showed a program transformation technique to derive circular programs from the straightforward strict, multiple traversal solutions.
The Haskell circular program that solves the repmin problem is presented next.
data R = TWiki.RootProd Tree
data Tree = Tip Int
| Fork Tree Tree
repmin (TWiki.RootProd t) = replace
where (replace,m) = repmin_aux (t, m)
repmin_aux (Tip n, minIn) = (replace, m)
where replace = Tip minIn
m = n
repmin_aux (Fork t1 t2, minIn) = (replace, m)
where replace = Fork replace1 replace2
m = min m1 m2
(replace1, m1) = repmin_aux (t1, minIn)
(replace2, m2) = repmin_aux (t2, minIn)
Notice that, on the above program's call:
(replace,m) = repmin_aux (t, m)
the variable
m
is both an argument and a result of the call.
This type of circular definitions are directly executable on lazy languages only.
I have: coordinated the Software Technologies and Software Languages Summer School (working group on data driven technological spaces, with a contributed http ...
Activities: I have served/will serve: in the Program Comittee for the following conferences: 22nd ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation ...
Publications 2012 and Implementation of ClassSheet Models , Jácome Cunha, João Paulo Fernandes, Jorge Mendes, João Saraiva. In the Proceedings of the IEEE Symposium ...
Research Projects: Foundations, Applications and Tools for Bidirectional Transformations, FCT funded, 2011 ... Bidirectional Transformations Applied to Programming ...
Awards and Distinctions 99/00 , 00/01 , 01/02 , 02/03 University of Minho 's Scholar Merit Award Awarded by the University of Minho to students that ...
The HaCirc tool HaCirc is an Haskell refactor. It refactors circular programs into its strict counterpart. The tool accepts, as input, Haskell circular programs ...
The OCirc tool The OCirc tool is a tool that allows OCaml programmers to express their multiple traversal programs as circular programs. This tool transforms circular ...
The HaGLR tool During my degree internship I was to study, among other things, Parser techniques and algorithms. Under this goal, we (me and my internship supervisor ...
HaGLR A Haskell based Generalized LR Parser Generator and Grammar Interpreter HaCirc Strictification and Slicing of lazy Circular Haskell Programs OCirc ...
Personal/Joao Web Preferences The following settings are web preferences of the Personal/Joao web. These preferences overwrite the site level preferences in ...
PhD Program Three years ago I started working on my PhD project, under FCT's grant SFRH/BD/19186/2004 . I've been working under the supervision of João Saraiva (University ...
Circular Functional Programming Circular Programs were first proposed by Richard Bird as an elegant and efficient technique to eliminate multiple traversal of data ...
The CircLib library The CircLib library is a Haskell based library that implements the schedulling of circular definitions. This library implements an adaptation ...
Circular Programs Circular Programs were first proposed by Richard Bird as an elegant and efficient technique to eliminate multiple traversal of data structures. As ...
Incremental Spreadsheet Interpreter One of my major research interest subjects is Adaptive and Incremental computation. An adaptive computation maintains the relationship ...
This is a subscription service to be automatically notified by e mail when topics change in this Personal/Joao web. This is a convenient service, so you do not have ...
PhD Program Three years ago I started working on my PhD project, under FCT's grant SFRH/BD/19186/2004 . I've been working under the supervision of João Saraiva (University ...
Activities: I have served/will serve: in the Program Comittee for the following conferences: 22nd ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation ...
Awards and Distinctions 99/00 , 00/01 , 01/02 , 02/03 University of Minho 's Scholar Merit Award Awarded by the University of Minho to students that ...
The CircLib library The CircLib library is a Haskell based library that implements the schedulling of circular definitions. This library implements an adaptation ...
The HaCirc tool HaCirc is an Haskell refactor. It refactors circular programs into its strict counterpart. The tool accepts, as input, Haskell circular programs ...
The HaGLR tool During my degree internship I was to study, among other things, Parser techniques and algorithms. Under this goal, we (me and my internship supervisor ...
Incremental Spreadsheet Interpreter One of my major research interest subjects is Adaptive and Incremental computation. An adaptive computation maintains the relationship ...
The OCirc tool The OCirc tool is a tool that allows OCaml programmers to express their multiple traversal programs as circular programs. This tool transforms circular ...
Research Projects: Foundations, Applications and Tools for Bidirectional Transformations, FCT funded, 2011 ... Bidirectional Transformations Applied to Programming ...
Publications 2012 and Implementation of ClassSheet Models , Jácome Cunha, João Paulo Fernandes, Jorge Mendes, João Saraiva. In the Proceedings of the IEEE Symposium ...
I have: coordinated the Software Technologies and Software Languages Summer School (working group on data driven technological spaces, with a contributed http ...
HaGLR A Haskell based Generalized LR Parser Generator and Grammar Interpreter HaCirc Strictification and Slicing of lazy Circular Haskell Programs OCirc ...
Circular Functional Programming Circular Programs were first proposed by Richard Bird as an elegant and efficient technique to eliminate multiple traversal of data ...
Circular Programs Circular Programs were first proposed by Richard Bird as an elegant and efficient technique to eliminate multiple traversal of data structures. As ...
This is a subscription service to be automatically notified by e mail when topics change in this Personal/Joao web. This is a convenient service, so you do not have ...
Personal/Joao Web Preferences The following settings are web preferences of the Personal/Joao web. These preferences overwrite the site level preferences in ...
This is a subscription service to be automatically notified by e-mail when topics change in this Personal/Joao web. This is a convenient service, so you do not have to come back and check all the time if something has changed. To subscribe, please add a bullet with your TWiki.WikiName in alphabetical order to this list:
Each TWiki web has an automatic e-mail notification service that sends you an e-mail with links to all of the topics modified since the last alert.
Users subscribe to email notifications using their TWiki.WikiName or an alternative email address, and can specify the webs/topics they wish to track using one of these bullet list formats:
three spaces * [ webname . ] wikiName - SMTP mail address three spaces * [ webName . ] wikiName three spaces * SMTP mail address three spaces * SMTP mail address : topics three spaces * [ webname . ] wikiName : topics
In the above examples, topics is a space-separated list of topic names. The user may further customize the specific content they will receive using the following formats:
Specify topics without a Web. prefix
Topics must exist in this web.
Topics may be specified using * wildcards
Each topic may optionally be preceded by a '+' or '-' sign. The '+' sign means "subscribe to this topic" (the same as not putting anything). The '-' sign means "unsubscribe" or "don't send notifications regarding this topic". This allows users to elect to filter out certain topics (and their children, to an arbitrary depth). Topic filters ('-') take precedence over topic includes ('+').
Each topic may optionally be followed by an integer in parentheses, indicating the depth of the tree of children below that topic. Changes in all these children will be detected and reported along with changes to the topic itself. Note This uses the TWiki "Topic parent" feature.
Each topic may optionally be immediately followed by an exclamation mark ! or a question mark ? with no intervening spaces, indicating that the topic (and children if there is a tree depth specifier as well) should be mailed out as complete topics instead of change summaries. ! causes the topic to be mailed every time even if there have been no changes, ? will mail the topic only if there have been changes to it. This only makes sense for subscriptions.
For example:
Subscribe Daisy to all changes to topics in this web.
* daisy.cutter@flowers.com
Subscribe Daisy to all changes in all webs that start with Web.
* daisy.cutter@flowers.com: Web*
Subscribe Daisy to changes to topics starting with Petal, and their immediate children, WeedKillers and children to a depth of 3, and all topics that match start with Pretty and end with Flowers e.g. PrettyPinkFlowers
Subscribe Daisy to the full content of NewsLetter whenever it has changed
* daisy@flowers.com: TWiki.NewsLetter?
Subscribe buttercup to NewsLetter and its immediate children, even if it hasn't changed.
* buttercup@flowers.com: TWiki.NewsLetter! (1)
Subscribe GardenGroup (which includes Petunia) to all changed topics under AllnewsLetters to a depth of 3. Then unsubscribe Petunia from the ManureNewsLetter, which she would normally get as a member of TWiki.GardenGroup:
A user may be listed many times in the WebNotify topic. Where a user has several lines in WebNotify that all match the same topic, they will only be notified about changes that topic once (though they will still receive individual mails for news topics).
If a TWiki group is listed for notification, the group will be recursively expanded to the e-mail addresses of all members.
Tip: List names in alphabetical order to make it easier to find the names.
Note for System Administrators: Notification is supported by an add-on to the TWiki kernel called the MailerContrib. See the TWiki.MailerContrib topic for details of how to set up this service.
Note: If you prefer a news feed, point your reader to Personal/Joao.WebRss (for RSS 1.0 feeds) or Personal/Joao.WebAtom (for ATOM 1.0 feeds). Learn more at TWiki.WebRssBase and TWiki.WebAtomBase, respectively.
Related topics: TWiki.WebChangesAlert, Main.TWikiUsers, TWiki.TWikiRegistration
The following settings are web preferences of the Personal.Joao web. These preferences overwrite the site-level preferences in TWiki.TWikiPreferences, and can be overwritten by user preferences (your personal topic, eg: Main.TWikiGuest in the Main web).
Preferences:
Set WEBTITLE = João Fernandes
List of topics of the TWiki.Personal/Joao web:
Web specific background color: (Pick a lighter one of the TWiki.StandardColors)
Set WEBBGCOLOR = #3366CC
List this web in the TWiki.SiteMap:
If yes, set SITEMAPLIST to on, do not set NOSEARCHALL, and add the "what" and "use to..." description for the site map. Make sure to list only links that include the name of the web, e.g. Personal/Joao.Topic links.
Set SITEMAPLIST = on
Set SITEMAPWHAT = João Fernandes
Set SITEMAPUSETO = ...collaborate on
Exclude web from a web="all" search: (Set to on for hidden webs)
Set NOSEARCHALL =
Prevent automatic linking of WikiWords and acronyms (if set to on); link WikiWords (if empty); can be overwritten by web preferences:
Set NOAUTOLINK = on
Note: Use the [[...][...]] syntax to link topics in case you disabled WikiWord linking. The <noautolink> ... </noautolink> syntax can be used to prevents links within a block of text.
Default template for new topics and form(s) for this web:
TWiki.WebTopicEditTemplate: Default template for new topics in this web. (Site-level is used if topic does not exist)
A preference is defined as: 6 spaces * Set NAME = value Example:
Set WEBBGCOLOR = #FFFFC0
Preferences are used as TWiki.TWikiVariables by enclosing the name in percent signs. Example:
When you write variable %WEBBGCOLOR% , it gets expanded to #3366CC .
The sequential order of the preference settings is significant. Define preferences that use other preferences first, i.e. set WEBCOPYRIGHT before WIKIWEBMASTER since %WEBCOPYRIGHT% uses the %WIKIWEBMASTER% variable.
You can introduce new preferences variables and use them in your topics and templates. There is no need to change the TWiki engine (Perl scripts).
Related Topics:
TWiki.TWikiPreferences has site-level preferences.
Main.TWikiUsers has a list of user topics. User topics can have optional user preferences.
TWiki.TWikiVariables has a list of common %VARIABLES%.
TWiki.TWikiAccessControl explains how to restrict access by users or groups.
TWiki's Personal/Joao web
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao
The Personal/Joao web of TWiki. TWiki is a Web-Based Collaboration Platform for the Corporate World.en-usCopyright 2020 by contributing authorsTWiki Administrator [webmaster@di.uminho.pt]The contributing authors of TWikiTWikiDIUM.Personal/Joao
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao
/twiki/pub/Main/LocalLogos/um_eengP.jpgWebSideBar
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/WebSideBar
(last changed by JoaoFernandes)2012-10-14T18:46:41ZJoaoFernandesWebHome
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/WebHome
Name: João Paulo Fernandes Email: jpaulo AT di DOT uminho DOT pt Address: Departamento de Informática, ... (last changed by JoaoFernandes)2012-10-14T18:42:05ZJoaoFernandes--TwikiJoaoTalks
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/--TwikiJoaoTalks
I have: coordinated the Software Technologies and Software Languages Summer School (working group on data driven technological spaces, with a contributed http ... (last changed by JoaoFernandes)2012-09-24T14:02:50ZJoaoFernandes--TwikiJoaoActivities
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/--TwikiJoaoActivities
Activities: I have served/will serve: in the Program Comittee for the following conferences: 22nd ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation ... (last changed by JoaoFernandes)2012-09-20T09:39:18ZJoaoFernandes--TwikiJoaoPublications
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/--TwikiJoaoPublications
Publications 2012 and Implementation of ClassSheet Models , Jácome Cunha, João Paulo Fernandes, Jorge Mendes, João Saraiva. In the Proceedings of the IEEE Symposium ... (last changed by JoaoFernandes)2012-09-20T09:24:38ZJoaoFernandes--TwikiJoaoSupervision
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/--TwikiJoaoSupervision
Supervision: Together with Saraiva I co supervise the PhD program of Msc. Martins with title Zippers based embedding of Attribute Grammars . (last changed by JoaoFernandes)2012-09-10T20:47:10ZJoaoFernandes--TwikiJoaoProjects
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/--TwikiJoaoProjects
Research Projects: Foundations, Applications and Tools for Bidirectional Transformations, FCT funded, 2011 ... Bidirectional Transformations Applied to Programming ... (last changed by JoaoFernandes)2012-06-21T11:20:21ZJoaoFernandes--TwikiJoaoAwards
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/--TwikiJoaoAwards
Awards and Distinctions 99/00 , 00/01 , 01/02 , 02/03 University of Minho 's Scholar Merit Award Awarded by the University of Minho to students that ... (last changed by JoaoFernandes)2011-09-22T13:31:05ZJoaoFernandesMenuTopics
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/MenuTopics
http://wiki.di.uminho.pt/wiki/bin/view/PURe/WebHome PURe project Publications Projects Tools Awards and Distinctions (last changed by JoaoFernandes)2010-12-10T15:24:07ZJoaoFernandesPoint
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/Point
(last changed by JoaoFernandes)2009-12-16T20:27:01ZJoaoFernandes--TwikiJoaoHaCirc
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/--TwikiJoaoHaCirc
The HaCirc tool HaCirc is an Haskell refactor. It refactors circular programs into its strict counterpart. The tool accepts, as input, Haskell circular programs ... (last changed by JoaoFernandes)2009-09-02T17:38:34ZJoaoFernandes--TwikiJoaoOCirc
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/--TwikiJoaoOCirc
The OCirc tool The OCirc tool is a tool that allows OCaml programmers to express their multiple traversal programs as circular programs. This tool transforms circular ... (last changed by JoaoFernandes)2009-02-19T11:45:07ZJoaoFernandes--TwikiJoaoOthers
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/--TwikiJoaoOthers
Other Interests As for recreation, my main sport hobbies are: indoor soccer waterpolo jogging swimming As for cultural enhancement, I just wish ... (last changed by JoaoFernandes)2008-12-18T16:10:31ZJoaoFernandes--TwikiJoaoHaGLR
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/--TwikiJoaoHaGLR
The HaGLR tool During my degree internship I was to study, among other things, Parser techniques and algorithms. Under this goal, we (me and my internship supervisor ... (last changed by JoaoFernandes)2008-12-05T11:57:07ZJoaoFernandes--TwikiJoaoTools
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/--TwikiJoaoTools
HaGLR A Haskell based Generalized LR Parser Generator and Grammar Interpreter HaCirc Strictification and Slicing of lazy Circular Haskell Programs OCirc ... (last changed by JoaoFernandes)2008-12-05T11:56:02ZJoaoFernandes--TwikiJoaoTemp
http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joao/--TwikiJoaoTemp
JoaoFernandes 25 Sep 2008 JoaoFernandesCV.pdf: Curriculum Vitae proposal.pdf: PosDocProposal (last changed by JoaoFernandes)2008-09-25T17:58:10ZJoaoFernandes