Skip to content

Commit

Permalink
Updated Readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nponeccop committed Feb 10, 2013
1 parent a4fbdba commit 3987cd5
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 15 deletions.
53 changes: 38 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,55 @@
# Quick Start

## Build
## Windows

cabal configure
Install Haskell Platform then run:
```
cabal update
cabal install --only-dependencies
configure
build
dist\build\spl-hnc\spl-hnc hn_tests\euler6.hn
```

cabal build
## *nix

## Try
Install GHC or Haskell Platform and run:

```
cabal update
cabal install --only-dependencies
PATH=$PATH:~/.cabal/bin
cabal configure
cabal build
./dist/build/spl-hnc/spl-hnc ./hn_tests/euler6.hn
```

# Advanced use

- read wiki
- run our test suites
- run `hnc` with `-O` option to see our first attempts at optimization
- feed generated `.cpp` files to a C++ compiler and linker either directly or by using our extension to Boost.Build.

You'll need MSVC/GCC, Boost and Boost.

# Under the hood

HNC is an open-source cross-platform compiler based on modern technologies: Glasgow Haskell Platform, UUAGC attribute grammar preprocessor, Parsec parsing library, HOOPL graph optimization library. The codebase is tiny: less than 4 KLOC, in the spirit of VPRI Ometa.
HNC is an open-source cross-platform compiler based on modern technologies: Glasgow Haskell Platform,
UUAGC attribute grammar preprocessor, Parsec parsing library, HOOPL graph optimization library.
The codebase is tiny: less than 4 KLOC, in the spirit of VPRI Ometa.

## State of affairs

State of affairs
Many HN programs can already be compiled into an ugly functional subset of C++ and then into executables and run (see hn_tests folder for .hn sources and .cpp targets).
A UDP echo server and a few Project Euler problems are the only useful programs so far, but mostly because we are too lazy to write more examples.
Many HN programs can already be compiled into an ugly functional subset of C++ and
then into executables and run (see `hn_tests` folder for `.hn` sources and `.cpp` targets).
A UDP echo server and a few Project Euler problems are the only useful programs so far,
but mostly because we are too lazy to write more examples.

## What is done

- Parser
- Type inference using UUAG, including injection of explicit template parameters when C++ doesnt infer them
- Type inference using UUAG, including injection of explicit template parameters when C++ doesn't infer them
- Identifier- and scope-preserving translation from AST into graph IR and back using HOOPL dominator analysis
- A rudimentary and buggy optimizer of the IR using HOOPL
- Compiler of closures into C++ functors using UUAG (almost)
Expand All @@ -41,11 +69,6 @@ A UDP echo server and a few Project Euler problems are the only useful programs
- SPL support is almost missing
- Polymorphic constants like “empty list” are not supported

## The bottom line
Your contributions are welcomed!

## Licence
Copyrigth (C) 2011 Andy Melnikov.
## License

Distributed under GNU Lesser General Public Licence Version 3.

3 changes: 3 additions & 0 deletions build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off
path %APPDATA%\cabal\bin;%PATH%
cabal build
3 changes: 3 additions & 0 deletions configure.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off
path %APPDATA%\cabal\bin;%PATH%
cabal configure

0 comments on commit 3987cd5

Please sign in to comment.