[Apologies if you receive multiple copies]
-
RESEARCH POSITIONS IN ARTIFICIAL INTELLIGENCE
-
National ICT Australia (NICTA) is seeking applications from high
performing researchers to work in its Kno
(Advance apologies for receiving multiple copies)
Dear colleagues,
It is a pleasure for us to announce the final program for the Industry Day
at the upcoming Formal Methods'05 conference, University of Newcastle Upon
Tyne, UK. I-day is organised by the Formal Techniques Industrial Association
as
A 3-year PhD-Position is available in the project
"Monadic Computational Logics in HOL"
at the University of Bremen. The project is concerned with the
implementation and further development of monadic computational logics,
including monadic Hoare logic and monadic dynamic logic as well a
Arka al Eel <[EMAIL PROTECTED]> writes:
> Haskell does not seem to have an easy way to do this. After looking
> through some papers I found lots of things that *might* handle this,
> like Generic Haskell, "scrap your boilerplate", Drift, etc. Now I'm
> not sure what works best for real world, bre
Here is a solution to your problem in Generic Haskell, see
www.generic-haskell.org.
You use gmap to traverse the structure, and
have a special case for the type Expr, which does the
optimization.
I'm surprised the `real world' is this easy :-)
-
module
data Expr = Const Int | Var String | Add Expr Expr
optimize (Add x (Const 0)) = x
You would now want this to be this generic, so the function should be
recursive for all other constructors *and* other data types. For
example, suppose that Expr is included in other datatype:
data Stm = A
Hi,
I'm playing with generic programming. At the moment I'm interested in
reusable transformations on data types. Provided for example a toy
datatype Expr like this:
data Expr = Const Int | Var String | Add Expr Expr
Plus a function "optimize" that optimizes a pattern "x + 0" into "x":
optimize