A tutorial on graph transformation

A nice application of category theory to computer science that is rather simpler than its application to semantics tends to get is the single and double pushout approach to graph transformation. Categorical pushouts allow patterns and rewrites on many kinds of structure, in particular graphs, to be specified in a simple manner. The theory can be read forwards, generalising term rewriting systems to graph rewriting systems, or backwards, specifying parsing problems for a graph grammar.

There's a shortage of good introductory material to this idea online. Offline I can recommend Tutorial introduction to the algebraic approach of graph grammars based on double and single pushouts [citeseer]. Online I suggest Practical Use of Graph Rewriting, and I welcome other suggestions.

Busy, busy

We are on holiday (it's the Jewish new year), and on top of that there are some problems at work, that may mean looking for a new job soon.

Hence my lack of posts.

I am sure others will fill in.

newLisp: A better Lisp/Scheme Fusion...

I had been breathlessly watching Paul Graham's website hoping for news about Arc, his "New Lisp". But I hadn't realized that a group of developers had already beaten him to the punch!

newLisp is an updated (and scaled down) Lisp, targeted at the scripting world. From the web site:

newLISP is a general purpose scripting language for developing Web applications and programs in general and in the domain of Artificial Intelligence (AI) and statistics.

Among its many interesting features (such as useful functions for getting scripting work done, good performance, and small footprint) are:

  • Dynamic and lexical scoping with multiple name spaces
  • OOP extensions
  • TCP/IP and UDP networking functions
  • Perl compatible regular expressions, PCRE
  • Matrix and advanced math functions
  • Financial math functions
  • Statistical functions
  • XML functions and SXML support
  • Tcl/Tk Graphical Fontend
  • Modules for MYSQL, SQLite and ODBC Database access
  • CGI, SMTP, POP3 and FTP Modules
  • Complete documentation in HTML and PDF

While many new scripting languages languish with good implementations, but no fully-realized libraries or interaction with outside software, newLisp seems to have sprung fully-formed, with various useful libraries already implemented.

Newlisp compiles on most LINUX, UNIX versions, CYGWIN, Windows, and presumably Mac OS X. It is licensed under the GNU Public License, GPL

Who knows -- perhaps now Ehud will have a Lisp with which he can finally get some scripting work done!

Generics for the masses

Ralf Hinze. Generics for the masses. In Kathleen Fisher, editor, Proceedings of ICFP'04, Snowbird, Utah, September 19-22, 2004.

Mentioned (with no link) on LtU1.

Hinze shows how to program generically in Haskell 98, making extensive use of type classes.

Those interested in generic programming should make sure they are familiar with references cited in section 5 (many of which were discussed here in the past).

Use real names

For some reason many new LtU members choose not reveal their real names. This makes the site less friendly in my opinion, and perhaps even discourages discussion.

I urge people to use their real names, unless they think there's good reason not to, in which case do what you think is best.


More from Udell on typing

In this clip from an IT Conversations interview Jon Udell tries to explain what dynamic languages are.

I think this clip makes it clear that (a) the situation as regards the terminology used to describe type system issues is beyond hope and (b) the issues Jon tries to deal with are quite real.

As we noted many times in the past, "strong" typing is not the same as "explicit typing" and most of the goals Jon talks about are achievable with statically typed languages.

In fact, dynamic - or scripting - languages encourage a development process in which programs are modified and translated iteratively, so having the compiler check the "morphed" data structures and infer their type shouldn't really be a problem, and in fact can help the developer. Naturally, since not all the code is changed at once a language that would appeal to Jon would allow the programmer to restrict the scope of type checking to specific parts of the program (e.g., only routines that may in fact be invoked).

Whatever your opinions regrading typing, I think it is very clear that we should move the debate away from having Pscal and Java as the only examples of strong typing, and C as the only example of weak typing. I hope LtU would set a good example for the rest of the community...

A Functional Quantum Programming Language

We introduce the language QML, a functional language for quantum computations on finite types. Its design is guided by its categorical semantics: QML programs are interpreted by morphisms in the category FQC of finite quantum computations realizable as quantum gates.

Warning - it's a draft. From the Types Forum.

A simple equation solver using attribute access and introspection

A nice hack which makes use of several language features to create a fun programming experience (or "user inteface" if you want).

Description Logics in Literate Haskell

Experiments from Graham Klyne:

This file is my attempt to better understand the structure and uses
of Description Logic (DL) languages for knowledge reresentation and inference, with the ultimate aim of better understanding the capabilities and limitations of the Semantic Web ontology language OWL, whose design draws much from Description Logic languages.

See also rdfweb-dev post, "Haskell vs. Ada vs. C++ vs. Awk vs. ..., An Experiment in Software Prototyping Productivity" (PS format)

SAT 3 Proof with E Prover via OWL

An interesting little Semantic Web-related development reported by Jos De Roo (creator of the Java/C# Euler inference engine). He's got the E Prover (an equational theorem prover for clausal logic), to find a proof for the OWL (Web Ontology Language) test case "inconsistent502" (RDF, variations), which is a Description Logic encoding of one of the classic SAT 3 problems.