homepage: https://github.com/ijaketak/ast-path#readme
changelog-type: markdown
hash: 1f513bfe37ab68e2083f19b0457d6bc0a77cd1c32f9e646441919476fa300d53
test-bench-deps:
  base: ! '>=4.7 && <5'
  ast-path: -any
  tasty-hunit: -any
  tasty: -any
maintainer: ijaketak@gmail.com
synopsis: vocabulary representation for predicting program properties
changelog: |
  ## 0.1.0

  Initial version
basic-deps:
  base: ! '>=4.7 && <5'
all-versions:
- 0.1.2
author: Keito Kajitani
latest: 0.1.2
description-type: markdown
description: |
  # ast-path

  AST-path is a representation for predicting program properties.

  AST-path is described in the paper "A General Path-Based Representation for Predicting Program Properties" (PLDI'2018) <https://arxiv.org/abs/1803.09544>
  and used at <https://code2vec.org/> and at <https://code2seq.org/>.

  ```
  {-# LANGUAGE DeriveGeneric #-}
  import Data.ASTPath

  data Tree a = Leaf a | Node (Tree a) (Tree a)
    deriving (Eq, Show, Generic)

  instance AST a => AST (Tree a)
  instance AST Int where
    astPathWithHalf = terminalPath show

  >>> astPath $ Node (Leaf 0) (Node (Leaf 1) (Leaf 2))
  [("Node",["Leaf","1"],["Leaf","2"]),("Node",["Leaf","0"],["Node","Leaf","1"]),("Node",["Leaf","0"],["Node","Leaf","2"])]
  ```
license-name: BSD-3-Clause

Update from Hackage at 2019-06-13T07:58:07Z
Update from Hackage at 2019-06-13T07:58:07Z
