solomono / kiama Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/kiama
License: GNU Lesser General Public License v3.0
Automatically exported from code.google.com/p/kiama
License: GNU Lesser General Public License v3.0
1. Kiama Kiama is a Scala library for language processing. In the Kiama project we are investigating embedding of language processing formalisms such as grammars, parsers, rewriters and analysers into general-purpose programming languages. IMPORTANT NOTE: Kiama is a research project, it's early days and the code is undergoing heavy development, so many details will change. Consult with us before you rely on it for serious work. We make no guarantees about the features or performance of the Kiama library if you do choose to use it. Tony Sloane Programming Languages Research Group Department of Computing, Macquarie University [email protected] [email protected] http://plrg.science.mq.edu.au/ 2. The Kiama project site at Google code Information about how to build, install and use Kiama can be found on the Kiama project site: http://kiama.googlecode.com 3. Documentation and mailing lists The main documentation for Kiama takes the form of wiki pages covering library features and examples, available at the Google Code site. The User Manual page is a good place to start: http://code.google.com/p/kiama/wiki/UserManual For summary information about Kiama releases, including dependencies on other software and links to API documentation, see the Releases wiki page: http://code.google.com/p/kiama/wiki/Releases Installation instructions can be found here: http://code.google.com/p/kiama/wiki/Installation There are also two Google Groups for Kiama: kiama General announcements and discussions http://groups.google.com/group/kiama [email protected] kiama-commit Commit messages and Hudson build problems http://groups.google.com/group/kiama-commit [email protected] 4. Acknowledgements The Kiama Project team is: Tony Sloane Dominic Verity Matthew Roberts Other contributors have been: Lennart Kats (particularly in attribution) Ben Mockler (the first version of the Oberon-0 example) Kiama is currently concentrating on incorporating existing language processing formalisms, so credit goes to the original developers of those formalisms. See the code for details of the sources of ideas that come from elsewhere. Many of the library rewriting strategies are based on the Stratego library. See http://releases.strategoxt.org/docs/api/libstratego-lib/stable/docs/. 5. Licensing Kiama is distributed under the GNU Lesser General Public License. See the files COPYING and COPYING.LESSER for details of these licenses. More information can be found at http://www.gnu.org/licenses/.
In the rewriting module we use a home-grown technique for creating a clone of a
term with some
or all of the children changed. It should be possible to use the new Scala
2.8.0 copy methods for
case classes to achieve this in a more standard fashion.
Original issue reported on code.google.com by inkytonik
on 2 Jun 2009 at 12:38
Move the test utility functions like expect, isFail etc into the util package
from the test module and
avoid duplication in multiple places.
Original issue reported on code.google.com by inkytonik
on 14 Jun 2009 at 9:25
For many purposes combinator-based parsers are not ideal since details like
tree construction need
to be specified manually. Hence, we want to also support some methods for
getting tree data into
Kiama code using generated parsers. Rats! seems like a good choice since it
has the expressibility
of parsing expression grammars plus good facilities for modular grammars.
The current Rats! generates Java parsers which we can call from Scala, but
difficulties are created if
we want to build Scala trees.
Original issue reported on code.google.com by inkytonik
on 5 Nov 2009 at 4:55
Work up an example for this and see what happens. I think the idea is that you
need to provide the
Product interface on your non-Product classes and then everything is OK.
Original issue reported on code.google.com by inkytonik
on 5 Nov 2009 at 5:26
We already have test that can check that a processor produces the right output
when given a
particular input. We also need the next step. For examples where the input is
processed to an
executable form, we also need tests that run the compiled program on inputs and
make sure that
the outputs are correct. This would be used in the Oberon0 and ISWIM examples.
Original issue reported on code.google.com by inkytonik
on 4 May 2010 at 12:12
At the moment we use an identity hash map to Unit, but could probably subclass
the hash sets or
something with an identity comparison.
This is also now relevant for uncached based attributes which need an identity
set to detect
circularity but are currently using a hashmap.
Original issue reported on code.google.com by inkytonik
on 14 Jun 2009 at 9:55
Congruences in Stratego allow you to write things like App (d, e) to pattern
match on App's, apply d
to the first component and e to the second component, failing if either d or e
fail.
Add a generic congruence combinator that gets us as far as we can to having
this notation for
Kiama.
Original issue reported on code.google.com by inkytonik
on 17 Nov 2009 at 2:20
Replace dodgy ant-based build process with one using sbt
Original issue reported on code.google.com by inkytonik
on 15 Sep 2009 at 3:45
The current lambda2 implements some of the strategies in
Dolstra, E., and Visser, E. Building interpreters with rewriting strategies. In
Proceedings of the 2nd
Workshop on Language Descriptions, Tools and Applications (2002), vol. 65 of
Electronic Notes in
Theoretical Computer Science, pp. 57โ76.
but we would like to do them all.
Original issue reported on code.google.com by inkytonik
on 5 Nov 2009 at 4:14
http://www.program-transformation.org/Sts/TILChairmarks
Original issue reported on code.google.com by inkytonik
on 14 Jun 2009 at 9:28
We originally used failure because Stratego's fail clashed with JUnit's fail.
But failure clashes with
the Scala parser library's failure, which is used more in this kind of code.
So, since we don't really
use JUint's fail and we are moving away from direct use of JUnit hopefully,
switch back to fail.
Original issue reported on code.google.com by inkytonik
on 17 Nov 2009 at 4:52
Generate list of all expressions obtained by incrementing or decrementing any
single literal in an
original expression.
Original issue reported on code.google.com by inkytonik
on 14 Jun 2009 at 9:40
Just try to see if there are any obvious bottlenecks on the example code. Can
we use something like
VisualVM?
Original issue reported on code.google.com by inkytonik
on 5 Nov 2009 at 5:24
Much of this is working and is ready to go, but we are writing larger specs
using it to test the library
in real applications. Some enhancements are pending the results of that work.
We also need to
write some documentation.
Original issue reported on code.google.com by inkytonik
on 18 Jan 2010 at 11:38
There is no need for Kiama to have a packrat parsing library when the standard
Scala library has
one, so remove our version and move the tests over to use the new one. Note any
capabilities that
are lacking and report to Scala team.
Original issue reported on code.google.com by inkytonik
on 2 Jun 2009 at 12:28
Add interface to allow the cache of specific cached attributes to be turned off
dynamically
Original issue reported on code.google.com by inkytonik
on 14 Jun 2009 at 9:54
We have some tracing code that can be enabled in the rewriting module, but it's
not everywhere it
probably should be. Do we really need it? How much is it slowing us down?
Original issue reported on code.google.com by inkytonik
on 5 Nov 2009 at 5:19
Do de do
Original issue reported on code.google.com by inkytonik
on 5 Nov 2009 at 4:57
For example, see the following for an idea of the kind of feature we want.
Boyland, J. T. Descriptional Composition of Compiler Components. PhD thesis,
University of Cali-
fornia, Berkeley, Sept. 1996. Available as technical report UCB//CSD-96-916.
Magnusson, E., Ekman, T., and Hedin, G. Extending attribute grammars with
collection attributes -
evaluation and applications. In Proceedings of the Seventh IEEE International
Working Conference on
Source Code Analysis and Manipulation (2007), IEEE Press.
Original issue reported on code.google.com by inkytonik
on 5 Nov 2009 at 2:55
At the moment the classpath refers to each of the JARs in lib_managed, but this
is fragile since the
exact jars in there will vary depending on the transitive dependencies of the
libraries that we use
directly. If possible, make the .classpath file just refer to the directory so
we don't have to update it
all the time.
Original issue reported on code.google.com by inkytonik
on 24 Nov 2009 at 2:30
For some projects we would like to be able to process trees that come from
tools such as SDF. This requires us to be able to do rewrites etc on ATerms.
At present we are looking at a typed implementation that translates a signature
in Scala case classes and provides typed readers and writers for the ATerm
representation.
Original issue reported on code.google.com by inkytonik
on 21 Oct 2010 at 3:32
At the moment if you want to use things like childAttr you need to make your
tree nodes inherit
from Attributable, which makes them Products etc. A more flexible situation
would be to make the
interface needed by things like childAttr into an interface that has an
implementation from
Attributable if you are using Products, but you could define it yourself if you
want.
Original issue reported on code.google.com by inkytonik
on 10 Nov 2009 at 3:31
Each example should have command(s) that show how to run the example in a built
system. We
should update these to work in the new sbt world.
Original issue reported on code.google.com by inkytonik
on 5 Nov 2009 at 5:29
Write wiki pages for each example.
Original issue reported on code.google.com by inkytonik
on 2 Jun 2009 at 12:43
The Oberon0 example has only been lightly tested. We should have a
comprehensive test suite to
make sure that more complex things like procedure calls, arrays, records are
working.
Original issue reported on code.google.com by inkytonik
on 12 Nov 2009 at 4:04
Once 2.8 is out we need to port the library to it. Apart from minor changes
due to language
updates, we expect work to be needed on collection-related code mostly. Also,
we plan at this
point to remove the Kiama parsing library and switch over to use the Scala 2.8
library since it will
now also have packrat parsers.
Original issue reported on code.google.com by inkytonik
on 5 Nov 2009 at 4:17
What steps will reproduce the problem?
1. Build the project
2. Look at what's in the main jar :)
What is the expected output? What do you see instead?
The examples shouldn't be in the distributed jar; they have lots of classes
that have similar or identical names to users' AST nodes.
What version of the product are you using? On what operating system?
1.0.0.a1 (trunk as of a couple days ago)
Original issue reported on code.google.com by alex%[email protected]
on 14 Apr 2010 at 10:33
Along the lines of the existing page on parsing combinators.
Original issue reported on code.google.com by inkytonik
on 2 Jun 2009 at 12:47
This seems to be the only thing in Attributable that is not related to
structural properties. Or to put
it another way, if you are not using structural properties you only really want
this from that module.
So, we should put it in Attribution somewhere so that Attributable could be
ignored in some cases.
Original issue reported on code.google.com by inkytonik
on 5 Nov 2009 at 5:34
Stratego's dynamic rewrite rules are ones that can be modified as the rewriting
proceeds and are conventionally used to implement context-sensitive rewriters
such as that needed for name analysis. We tend to implement these kinds of
things using attribution because it is more natural, but we have some work that
needs to do things in the Stratego way.
Original issue reported on code.google.com by inkytonik
on 21 Oct 2010 at 3:44
See CRAG paper for improvements to basic algorithm that we are currently using.
Original issue reported on code.google.com by inkytonik
on 14 Jun 2009 at 9:58
At some stage we would like to be only dependent directly on Scala libraries,
not on any java.* stuff.
Original issue reported on code.google.com by inkytonik
on 5 Nov 2009 at 5:32
The dup method in the Rewriter uses reflection to find the primary constructor
of a term class so
that it can create a new term with the constructor but possibly different
children. We could cache
these which might usefully limit the amount of reflection that is done. Do some
measurements to
see if this helps in typical cases. Is there some non-performance impacting
way to make it
optional?
Original issue reported on code.google.com by inkytonik
on 11 Aug 2009 at 3:37
See
http://swerl.tudelft.nl/twiki/pub/Main/TechnicalReports/TUD-SERG-2008-038.pdf
for
information on the kind of thing we plan to add.
Original issue reported on code.google.com by inkytonik
on 5 Nov 2009 at 2:52
Need an overview along the lines of the parsing combinator page that already
exists.
Original issue reported on code.google.com by inkytonik
on 2 Jun 2009 at 12:45
At the moment you have to specify the name of the main class exactly, whereas
it would be nice to
support completion as in the test-only command which completes over test
classes.
Original issue reported on code.google.com by inkytonik
on 2 May 2010 at 1:12
Add 'nowhere present' check, eg for DoubleNeg example, but others too, intadds
is ok, do that for
the others, also uniquevars should check for no duplicates in vars, or collect
in list and check that
they are sorted "var" ones.
Original issue reported on code.google.com by inkytonik
on 14 Jun 2009 at 9:39
For example, in the rewriting library. This would mean moving the declaration
of ==> into a more
central place from the Attribution module.
Original issue reported on code.google.com by inkytonik
on 14 Jun 2009 at 9:32
At the moment we have packages starting with "kiama", whereas it probably
should be "org.kiama"
or "com.googlecode.kiama" or something.
Original issue reported on code.google.com by inkytonik
on 22 Nov 2009 at 2:09
In some cases we use objects to encapsulate reusable code and import it where
needed. In others
we use traits and extend them to get the reuse. Both approaches usually work.
The trait one results
in different instances of the reused entities in each context where they trait
is extended. We need to
come up with a principled way of deciding which approach is appropriate for a
given situation and
apply it across Kiama.
Original issue reported on code.google.com by inkytonik
on 14 Jun 2009 at 9:34
Check for correctness and ease of running on "real" programs
Original issue reported on code.google.com by inkytonik
on 5 Nov 2009 at 5:21
At present, rewriting strategies are untyped much as in Stratego. We are
prevented from
constructing ill-typed terms by Scala's static typing, but there are currently
no constraints on
combinations of strategies. Adding type parameters along the lines of function
types should be
possible.
Original issue reported on code.google.com by inkytonik
on 5 Nov 2009 at 5:04
Now that the testing framework can do execution tests, we should have some in
the ISWIM
example. There are some coded up in tests/SECDTests.scala, but there should be
some file-to-file
ones as well. See the Oberon0 ExecutionTests for examples of how to do this.
Original issue reported on code.google.com by inkytonik
on 5 May 2010 at 12:51
It would be nice to have command editing etc. Try JLine?
Original issue reported on code.google.com by inkytonik
on 14 Jun 2009 at 10:00
Examples such as Oberon0 do not attach positions to AST nodes at present so all
reports refer to
0,0. We should use positioned to correctly position all nodes.
Original issue reported on code.google.com by inkytonik
on 5 May 2010 at 12:41
The last release on Scala 2.7 with changes since 0.8.
Original issue reported on code.google.com by inkytonik
on 5 Nov 2009 at 4:22
To further reduce our dependencies, we should try to replace our plain tests
that are written in
JUint style with ScalaTest style ones.
Original issue reported on code.google.com by inkytonik
on 5 Nov 2009 at 5:36
General tidy up
- make sure everything has something
- check markup on code refs in scaladoc
- use more complex markup, such as @param decls, @see links?
Original issue reported on code.google.com by inkytonik
on 5 Nov 2009 at 5:13
Weak maps might help garbage collection performance. Since we must use an
identity hash map,
we need to find an implementation of a weak identity hash map.
This also needs to fix the ones in the circular attributes, including the sets
computed and visited,
which are maps at the moment.
From Lennart: Only the JCL provides a weak hash map implementation, and it
doesn't allow
overriding of the equality/hash key getting mechanism. So to use weak hash maps
everywhere,
we'd need an IdentityEquality wrapper object (similar to the ArgAttributeKey
class). Of course, this
would make all this even more expensive. Alternatively, a brand new
IdentityWeakHashMap
implementation could work.
Original issue reported on code.google.com by inkytonik
on 14 Jun 2009 at 9:58
We have an implementation of a compiler for a cut-down version of Obr that we
use in teaching.
We should consider adding it to the examples since it does full (albeit) simple
semantic analysis and
code generation for a real language.
Original issue reported on code.google.com by inkytonik
on 6 Nov 2009 at 1:30
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.