mirror of
https://github.com/github/semantic.git
synced 2024-12-15 01:51:39 +03:00
458 lines
18 KiB
Plaintext
458 lines
18 KiB
Plaintext
name: semantic
|
|
version: 0.4.0
|
|
synopsis: Framework and service for analyzing and diffing untrusted code.
|
|
description: Please see README.md
|
|
homepage: http://github.com/github/semantic#readme
|
|
author: Rob Rix, Josh Vera
|
|
maintainer: rob.rix@github.com
|
|
copyright: 2016 GitHub
|
|
category: Web
|
|
build-type: Simple
|
|
-- extra-source-files:
|
|
cabal-version: >=1.10
|
|
|
|
flag release
|
|
description: Build with optimizations on (for CI or deployment builds)
|
|
default: False
|
|
|
|
library
|
|
hs-source-dirs: src
|
|
exposed-modules:
|
|
-- Analyses & term annotations
|
|
Analysis.Abstract.Caching.FlowInsensitive
|
|
, Analysis.Abstract.Caching.FlowSensitive
|
|
, Analysis.Abstract.Collecting
|
|
, Analysis.Abstract.Dead
|
|
, Analysis.Abstract.Graph
|
|
, Analysis.Abstract.Tracing
|
|
, Analysis.ConstructorName
|
|
, Analysis.CyclomaticComplexity
|
|
, Analysis.TOCSummary
|
|
, Analysis.Decorator
|
|
, Analysis.HasTextElement
|
|
, Analysis.PackageDef
|
|
-- Semantic assignment
|
|
, Assigning.Assignment
|
|
, Assigning.Assignment.Deterministic
|
|
, Assigning.Assignment.Table
|
|
-- Control structures & interfaces for abstract interpretation
|
|
, Control.Abstract
|
|
, Control.Abstract.Context
|
|
, Control.Abstract.Evaluator
|
|
, Control.Abstract.Heap
|
|
, Control.Abstract.Hole
|
|
, Control.Abstract.Modules
|
|
, Control.Abstract.Primitive
|
|
, Control.Abstract.PythonPackage
|
|
, Control.Abstract.Roots
|
|
, Control.Abstract.ScopeGraph
|
|
, Control.Abstract.Value
|
|
-- Effects
|
|
, Control.Effect.Interpose
|
|
, Control.Effect.REPL
|
|
-- Matching and rewriting DSLs
|
|
, Control.Matching
|
|
, Control.Rewriting
|
|
-- Datatypes for abstract interpretation
|
|
, Data.Abstract.Address.Hole
|
|
, Data.Abstract.Address.Located
|
|
, Data.Abstract.Address.Monovariant
|
|
, Data.Abstract.Address.Precise
|
|
, Data.Abstract.BaseError
|
|
, Data.Abstract.Declarations
|
|
, Data.Abstract.Evaluatable
|
|
, Data.Abstract.FreeVariables
|
|
, Data.Abstract.Heap
|
|
, Data.Abstract.Live
|
|
, Data.Abstract.Module
|
|
, Data.Abstract.ModuleTable
|
|
, Data.Abstract.Name
|
|
, Data.Abstract.Number
|
|
, Data.Abstract.Package
|
|
, Data.Abstract.Path
|
|
, Data.Abstract.Ref
|
|
, Data.Abstract.ScopeGraph
|
|
, Data.Abstract.Value.Abstract
|
|
, Data.Abstract.Value.Concrete
|
|
, Data.Abstract.Value.Type
|
|
-- General datatype definitions & generic algorithms
|
|
, Data.Algebra
|
|
, Data.AST
|
|
, Data.Blob
|
|
, Data.Diff
|
|
, Data.Duration
|
|
, Data.Error
|
|
, Data.File
|
|
, Data.Functor.Both
|
|
, Data.Functor.Classes.Generic
|
|
, Data.Graph
|
|
, Data.Graph.ControlFlowVertex
|
|
, Data.Graph.TermVertex
|
|
, Data.Graph.DiffVertex
|
|
, Data.Handle
|
|
, Data.History
|
|
, Data.ImportPath
|
|
, Data.JSON.Fields
|
|
, Data.Language
|
|
, Data.Location
|
|
, Data.Map.Monoidal
|
|
, Data.Proto.DiffTree
|
|
, Data.Proto.ParseTree
|
|
, Data.Patch
|
|
, Data.Project
|
|
, Data.Quieterm
|
|
, Data.Range
|
|
, Data.Reprinting.Errors
|
|
, Data.Reprinting.Fragment
|
|
, Data.Reprinting.Operator
|
|
, Data.Reprinting.Scope
|
|
, Data.Reprinting.Splice
|
|
, Data.Reprinting.Token
|
|
, Data.Semigroup.App
|
|
, Data.Scientific.Exts
|
|
, Data.Source
|
|
, Data.Span
|
|
-- À la carte syntax types
|
|
, Data.Syntax
|
|
, Data.Syntax.Comment
|
|
, Data.Syntax.Declaration
|
|
, Data.Syntax.Directive
|
|
, Data.Syntax.Expression
|
|
, Data.Syntax.Literal
|
|
, Data.Syntax.Statement
|
|
, Data.Syntax.Type
|
|
, Data.Term
|
|
-- Diffing algorithms & interpretation thereof
|
|
, Diffing.Algorithm
|
|
, Diffing.Algorithm.RWS
|
|
, Diffing.Algorithm.RWS.FeatureVector
|
|
, Diffing.Algorithm.SES
|
|
, Diffing.Interpreter
|
|
-- Language-specific grammar/syntax types, & assignments
|
|
, Language.Markdown.Assignment
|
|
, Language.Markdown.Syntax
|
|
, Language.Go.Grammar
|
|
, Language.Go.Assignment
|
|
, Language.Go.Syntax
|
|
, Language.Go.Type
|
|
, Language.Haskell.Grammar
|
|
, Language.Haskell.Assignment
|
|
, Language.Haskell.Syntax
|
|
, Language.Haskell.Syntax.Constructor
|
|
, Language.Haskell.Syntax.Haskell
|
|
, Language.Haskell.Syntax.Identifier
|
|
, Language.Haskell.Syntax.Pattern
|
|
, Language.Haskell.Syntax.QuasiQuote
|
|
, Language.Haskell.Syntax.Type
|
|
, Language.JSON.Grammar
|
|
, Language.JSON.Assignment
|
|
, Language.JSON.PrettyPrint
|
|
, Language.MiniRuby.Assignment
|
|
, Language.MiniPython.Assignment
|
|
, Language.Ruby.Grammar
|
|
, Language.Ruby.Assignment
|
|
, Language.Ruby.PrettyPrint
|
|
, Language.Ruby.Syntax
|
|
, Language.TypeScript.Assignment
|
|
, Language.TypeScript.Grammar
|
|
, Language.TypeScript.Resolution
|
|
, Language.TypeScript.Syntax
|
|
, Language.TypeScript.Syntax.JavaScript
|
|
, Language.TypeScript.Syntax.JSX
|
|
, Language.TypeScript.Syntax.TypeScript
|
|
, Language.PHP.Assignment
|
|
, Language.PHP.Grammar
|
|
, Language.PHP.Syntax
|
|
, Language.Python.Assignment
|
|
, Language.Python.Grammar
|
|
, Language.Python.PrettyPrint
|
|
, Language.Python.Syntax
|
|
, Language.Java.Assignment
|
|
, Language.Java.Grammar
|
|
, Language.Java.Syntax
|
|
, Matching.Core
|
|
, Numeric.Exts
|
|
-- Parser glue
|
|
, Parsing.CMark
|
|
, Parsing.Parser
|
|
, Parsing.TreeSitter
|
|
, Paths_semantic
|
|
-- Rendering formats
|
|
, Rendering.Graph
|
|
, Rendering.JSON
|
|
, Rendering.Renderer
|
|
, Rendering.Symbol
|
|
, Rendering.TOC
|
|
, Reprinting.Tokenize
|
|
, Reprinting.Translate
|
|
, Reprinting.Typeset
|
|
, Reprinting.Pipeline
|
|
-- High-level flow & operational functionality (logging, stats, etc.)
|
|
, Semantic.Analysis
|
|
, Semantic.AST
|
|
, Semantic.CLI
|
|
, Semantic.Config
|
|
, Semantic.Diff
|
|
, Semantic.Distribute
|
|
, Semantic.Env
|
|
, Semantic.Graph
|
|
, Semantic.IO
|
|
, Semantic.Parse
|
|
, Semantic.REPL
|
|
, Semantic.Resolution
|
|
, Semantic.Task
|
|
, Semantic.Task.Files
|
|
, Semantic.Telemetry
|
|
, Semantic.Telemetry.AsyncQueue
|
|
, Semantic.Telemetry.Haystack
|
|
, Semantic.Telemetry.Log
|
|
, Semantic.Telemetry.Stat
|
|
, Semantic.Timeout
|
|
, Semantic.Util
|
|
, Semantic.Util.Pretty
|
|
, Semantic.Util.Rewriting
|
|
, Semantic.Version
|
|
-- Serialization
|
|
, Serializing.DOT
|
|
, Serializing.Format
|
|
, Serializing.SExpression
|
|
, Tags.Taggable
|
|
, Tags.Tagging
|
|
-- Custom Prelude
|
|
, Prologue
|
|
build-depends: base >= 4.8 && < 5
|
|
, aeson
|
|
, algebraic-graphs
|
|
, ansi-terminal
|
|
, array
|
|
, async
|
|
, attoparsec
|
|
, bifunctors
|
|
, bytestring
|
|
, cmark-gfm
|
|
, containers
|
|
, cryptohash
|
|
, deepseq
|
|
, directory
|
|
, directory-tree
|
|
, fastsum
|
|
, filepath
|
|
, free
|
|
, freer-cofreer
|
|
, fused-effects
|
|
, ghc-prim
|
|
, gitrev
|
|
, Glob
|
|
, hashable
|
|
, haskeline
|
|
, hscolour
|
|
, http-client
|
|
, http-client-tls
|
|
, http-types
|
|
, kdt
|
|
, machines
|
|
, mersenne-random-pure64
|
|
, mtl
|
|
, network
|
|
, network-uri
|
|
, optparse-applicative
|
|
, parallel
|
|
, parsers
|
|
, prettyprinter
|
|
, pretty-show
|
|
, profunctors
|
|
, recursion-schemes
|
|
, reducers
|
|
, scientific
|
|
, semigroupoids
|
|
, semilattices
|
|
, split
|
|
, stm-chans
|
|
, template-haskell
|
|
, text >= 1.2.1.3
|
|
, these
|
|
, time
|
|
, unix
|
|
, unordered-containers
|
|
, vector
|
|
, proto3-suite
|
|
, proto3-wire
|
|
, haskell-tree-sitter
|
|
, tree-sitter-go
|
|
, tree-sitter-haskell
|
|
, tree-sitter-json
|
|
, tree-sitter-php
|
|
, tree-sitter-python
|
|
, tree-sitter-ruby
|
|
, tree-sitter-typescript
|
|
, tree-sitter-java
|
|
default-language: Haskell2010
|
|
default-extensions: DataKinds
|
|
, DeriveFoldable
|
|
, DeriveFunctor
|
|
, DeriveGeneric
|
|
, DeriveTraversable
|
|
, FlexibleContexts
|
|
, FlexibleInstances
|
|
, MonadFailDesugaring
|
|
, MultiParamTypeClasses
|
|
, OverloadedStrings
|
|
, RecordWildCards
|
|
, StandaloneDeriving
|
|
, StrictData
|
|
, TypeApplications
|
|
if flag(release)
|
|
ghc-options: -Wall -Werror -Wmissing-export-lists -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -fno-warn-name-shadowing -O1 -j -DCOMPUTE_GIT_SHA
|
|
else
|
|
ghc-options: -Wall -Wmissing-export-lists -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -fno-warn-name-shadowing -O0 -j +RTS -A128m -n2m -RTS
|
|
ghc-prof-options: -fprof-auto
|
|
|
|
executable semantic
|
|
hs-source-dirs: app
|
|
main-is: Main.hs
|
|
if flag(release)
|
|
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -A4m -n2m" -static -j -O1 -DCOMPUTE_GIT_SHA
|
|
else
|
|
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -A4m -n2m" -j -O0 -dynamic
|
|
cc-options: -DU_STATIC_IMPLEMENTATION=1
|
|
cpp-options: -DU_STATIC_IMPLEMENTATION=1
|
|
build-depends: base
|
|
, semantic
|
|
default-language: Haskell2010
|
|
default-extensions: FlexibleInstances, OverloadedStrings, RecordWildCards
|
|
|
|
test-suite test
|
|
type: exitcode-stdio-1.0
|
|
hs-source-dirs: test
|
|
main-is: Spec.hs
|
|
other-modules: Analysis.Go.Spec
|
|
, Analysis.PHP.Spec
|
|
, Analysis.Python.Spec
|
|
, Analysis.Ruby.Spec
|
|
, Analysis.TypeScript.Spec
|
|
, Assigning.Assignment.Spec
|
|
, Control.Abstract.Evaluator.Spec
|
|
, Control.Rewriting.Spec
|
|
, Data.Abstract.Path.Spec
|
|
, Data.Abstract.Name.Spec
|
|
, Data.Diff.Spec
|
|
, Data.Functor.Classes.Generic.Spec
|
|
, Data.Functor.Listable
|
|
, Data.Graph.Spec
|
|
, Data.Mergeable
|
|
, Data.Range.Spec
|
|
, Data.Scientific.Spec
|
|
, Data.Semigroup.App.Spec
|
|
, Data.Source.Spec
|
|
, Data.Term.Spec
|
|
, Diffing.Algorithm.RWS.Spec
|
|
, Diffing.Algorithm.SES.Spec
|
|
, Diffing.Interpreter.Spec
|
|
, Graphing.Calls.Spec
|
|
, Integration.Spec
|
|
, Matching.Go.Spec
|
|
, Matching.Python.Spec
|
|
, Numeric.Spec
|
|
, Proto3.Roundtrip
|
|
, Reprinting.Spec
|
|
, Rendering.TOC.Spec
|
|
, Semantic.Spec
|
|
, Semantic.CLI.Spec
|
|
, Semantic.IO.Spec
|
|
, Semantic.Stat.Spec
|
|
, Tags.Spec
|
|
, SpecHelpers
|
|
, Test.Hspec.LeanCheck
|
|
build-depends: aeson
|
|
, algebraic-graphs
|
|
, async
|
|
, base
|
|
, bifunctors
|
|
, bytestring
|
|
, containers
|
|
, fastsum
|
|
, filepath
|
|
, free
|
|
, fused-effects
|
|
, Glob
|
|
, hashable
|
|
, haskell-tree-sitter
|
|
, hspec >= 2.4.1
|
|
, hspec-core
|
|
, hspec-expectations-pretty-diff
|
|
, HUnit
|
|
, leancheck
|
|
, machines
|
|
, mtl
|
|
, network
|
|
, proto3-suite
|
|
, proto3-wire
|
|
, recursion-schemes >= 4.1
|
|
, semilattices
|
|
, semantic
|
|
, scientific
|
|
, text >= 1.2.1.3
|
|
, these
|
|
if flag(release)
|
|
ghc-options: -threaded -rtsopts -with-rtsopts=-N -j -O0
|
|
else
|
|
ghc-options: -threaded -rtsopts -with-rtsopts=-N -j -O0 -dynamic
|
|
default-language: Haskell2010
|
|
default-extensions: DataKinds
|
|
, DeriveFunctor
|
|
, DeriveGeneric
|
|
, FlexibleContexts
|
|
, FlexibleInstances
|
|
, MonadFailDesugaring
|
|
, MultiParamTypeClasses
|
|
, OverloadedStrings
|
|
, RecordWildCards
|
|
, StandaloneDeriving
|
|
, TypeApplications
|
|
|
|
test-suite lint
|
|
type: exitcode-stdio-1.0
|
|
hs-source-dirs: test
|
|
main-is: Lint.hs
|
|
default-language: Haskell2010
|
|
ghc-options: -dynamic -threaded -j
|
|
build-depends: base
|
|
, hlint
|
|
|
|
test-suite parse-examples
|
|
type: exitcode-stdio-1.0
|
|
hs-source-dirs: test
|
|
main-is: Examples.hs
|
|
default-language: Haskell2010
|
|
ghc-options: -threaded -rtsopts -with-rtsopts=-N -j
|
|
build-depends: base
|
|
, bytestring
|
|
, directory
|
|
, fastsum
|
|
, filepath
|
|
, fused-effects
|
|
, Glob
|
|
, hspec >= 2.4.1
|
|
, hspec-core
|
|
, hspec-expectations-pretty-diff
|
|
, process
|
|
, semantic
|
|
default-extensions: RecordWildCards
|
|
, FlexibleContexts
|
|
|
|
benchmark evaluation
|
|
hs-source-dirs: bench/evaluation
|
|
type: exitcode-stdio-1.0
|
|
main-is: Main.hs
|
|
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -A4m -n2m -T" -static -j -O1
|
|
cc-options: -DU_STATIC_IMPLEMENTATION=1
|
|
cpp-options: -DU_STATIC_IMPLEMENTATION=1
|
|
default-language: Haskell2010
|
|
build-depends: base
|
|
, criterion
|
|
, semantic
|
|
|
|
source-repository head
|
|
type: git
|
|
location: https://github.com/github/semantic
|