From: Nathaniel Wesley Filardo Date: Wed, 29 May 2013 16:43:45 +0000 (-0400) Subject: Documentation tweaks X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=39f9b66c102b46d82bd100f8005863a5b59f3c21;p=dyna2 Documentation tweaks Fix haddock in ParserHS --- diff --git a/README.md b/README.md index 60a9a4f..9c59a30 100644 --- a/README.md +++ b/README.md @@ -49,8 +49,9 @@ make things work by dropping the lower bound on the package in dyna.cabal.) You'll want to have the following programs installed, too: + * Python 2.7 or compatible * IPython - * Pygments (for pretty code output in our debugging tools) + * Pygments (for pretty code output in our compiler-debugging tools) Run the test harness: diff --git a/docs/TODO.LSA b/docs/TODO.LSA index b5936aa..7d41972 100644 --- a/docs/TODO.LSA +++ b/docs/TODO.LSA @@ -17,18 +17,30 @@ List notation ----- Analysis +Mode declarations -> backward chaining! + +Detect non-range-restriction and produce a different error message? + Abstract unification really ought not unroll recursion quite so eagerly as -it does. +it does. (Probably no time to deal with this; low priority anyway as it only +impacts speed of compilation) -Mode declarations -> backward chaining! +Liveness and fakeness of unification (after LSA?) + +Unification alias tracking (after LSA?) ----- Backend -Special error value (for = agg vio, div by 0, ...) +Check that we have = aggregation working correctly. -Maybe something better for initializers or a real update API? +Special error value (for = agg violation, div by 0, ...) + Some flavor of "root cause" pointer / string / ... ? Could we maybe get a better chart representation? + And better queries into the chart? We should be able to extract + adorned queries from the planner's output without too much effort... + +Maybe something better for initializers or update API? (Low priority) DOpAMine improvements for non-ground structure (probably no time!) @@ -36,11 +48,24 @@ DOpAMine improvements for non-ground structure (probably no time!) Mention ^C in documentation for diverging programs. +Be sure to mention, repeatedly, that this is experimental software and is +likely to break both early and often. Explain the difference between panic +messages and errors. + ----- Whole pipeline Need some better mechanism for executing queries after the agenda empties. + Take query, feed back to compiler / planner / ... + In general, we'd need to indicate which set of things we are + at present maintaining and possibly feed the whole program back + through the pipeline... if we stick with everything being + materialized, we can just feed the query through. -Can we extract backpointers from the chart? +Can we extract backpointers from the chart or generate code to do so? Can we run anything on e.g. WSJ with L0 grammar? - sentence(N) = ... + sentence(N) = ["The",...] + +How about... (other things students might want to do) + train a log-linear model (e.g. by using := for weights) + find the K most-frequent bigrams (even from the repl?) diff --git a/misc/ghc-bootstrap.sh b/misc/ghc-bootstrap.sh index 1162bf2..d44a64b 100644 --- a/misc/ghc-bootstrap.sh +++ b/misc/ghc-bootstrap.sh @@ -6,6 +6,13 @@ # because it's proven itself useful to bring up a Dyna-capable environment # on a few machines. + +# NOTICE! YOU MUST UPDATE THIS LINE! +# +# This is an absolute path devoid of $HOME so that this file +# continues to work when sourced by people whose homedirs are not mine! +HROOT=~nwf/src/haskell + GHCVER=7.6.3 HTMLROOT="../../" @@ -20,7 +27,6 @@ CABAL_BOOTSTRAP_PKGS="transformers-0.3.0.0 \ HTTP-4000.2.6 \ cabal-install-1.16.0.2" -HROOT=$HOME/src/haskell HPATH=$HROOT/_inst HBIN=$HPATH/bin HLIB=$HPATH/lib/ghc-$GHCVER @@ -48,6 +54,11 @@ case $CMD in $HBIN/runghc Setup install ;; + printpaths) + echo export LD_LIBRARY_PATH=$LD_LIBRARY_PATH + echo export PATH=$PATH + ;; + run) export PREFIX=$HPATH $@ @@ -66,15 +77,18 @@ case $CMD in (ln -s /usr/lib/libgmp.so.? _inst/lib/ghc-$GHCVER/libgmp.so) && # Bootstrap cabal-install (cd pkgs; for i in $CABAL_BOOTSTRAP_PKGS ; - do (cd $i; $HBIN/runghc Setup configure $CABALOPTS_BOOTSTRAP; + do (cd $i; rm -rf dist/; + $HBIN/runghc Setup configure $CABALOPTS_BOOTSTRAP; $HBIN/runghc Setup build; - $HBIN/runghc Setup install) + $HBIN/runghc Setup install) || exit 1 done) && # Now, reinstall so that we get documentation (cd pkgs; for i in $CABAL_BOOTSTRAP_PKGS; do (cd $i; $HBIN/cabal install $CABALOPTS --force-reinstalls); done) && # And last, build everything else we need out of cabal $HBIN/cabal update && + # Pull in alex and happy first, since we want them for builds below + $HBIN/cabal install $CABALOPTS -j12 alex happy && # Pull in the packages on which Dyna will depend as well as $HBIN/cabal install $CABALOPTS -j12 \ blaze-builder \ diff --git a/src/Dyna/ParserHS/Parser.hs b/src/Dyna/ParserHS/Parser.hs index b44faf4..c6e6e28 100644 --- a/src/Dyna/ParserHS/Parser.hs +++ b/src/Dyna/ParserHS/Parser.hs @@ -126,14 +126,14 @@ data Pragma = PDispos SelfDispos B.ByteString [ArgDispos] -- preserved across this operation! -- (XXX is that what we want?) - | PInst NameWithArgs -- ^ inst name - ParsedInst -- ^ defn body - -- ^ Declare an instantiation state name - - | PMode NameWithArgs -- ^ mode name - ParsedModeInst -- ^ From - ParsedModeInst -- ^ To - -- ^ Declare a mode name + | PInst NameWithArgs + ParsedInst + -- ^ Declare an instantiation state: name and body + + | PMode NameWithArgs + ParsedModeInst + ParsedModeInst + -- ^ Declare a mode: name, input, and output | POperAdd PragmaFixity Integer B.ByteString -- ^ Add an operator