1
1
mirror of https://github.com/github/semantic.git synced 2024-12-27 00:44:57 +03:00
Commit Graph

310 Commits

Author SHA1 Message Date
Timothy Clem
b92f81d0b6 More sophisticated health server 2018-05-23 11:04:15 -07:00
Rob Rix
115e887739 Merge branch 'master' into decompose-values 2018-05-23 09:59:16 -04:00
Rob Rix
54a4f289f7 Produce colour output with the Show serializer. 2018-05-23 09:00:29 -04:00
Patrick Thomson
2edafbf1d1 Merge branch 'master' into fast-builds-by-default 2018-05-22 17:52:18 -04:00
Patrick Thomson
1f26db7a5e -O2 is ridiculously slow, let's hold off for now 2018-05-22 17:48:07 -04:00
Patrick Thomson
c1d3a041cc set -Werror when building release 2018-05-22 17:38:13 -04:00
Patrick Thomson
88d7d19bb8 Make builds run at -O0 by default, except for CI/deploy.
It's always been easy to forget the `--fast` flag. With the introduction of
`semanticd`, forgetting that carries a significant speed hit, as GHC
optimizes the resulting executable very thoroughly, which entails a
significant uptick in time spent building. For our collective sanity's
sake, this patch makes `stack build` operate without optimizations. CI
and deploy jobs pass `--flag semantic:release` to `stack`, which
specifies the `-O2` level of optimizations.

Timing `stack clean && stack build` (which rebuilds the tree-sitter
packages) went from 6m17s to 3m04s on my machine.  When building just
`semantic` by itself, standard builds take 1m06s, whereas builds with
`--flag semantic:release` take 4m12s. (GHC does a lot of
optimizations!)
2018-05-22 17:18:03 -04:00
Patrick Thomson
c8d5a8d231 add test for cancelling in-flight parsers 2018-05-22 17:01:17 -04:00
Rob Rix
fb5b903af7 Merge branch 'master' into decompose-values 2018-05-22 08:44:54 -04:00
Timothy Clem
42af0faae6 New approach for linting 2018-05-21 08:17:11 -07:00
Timothy Clem
8fe6f7e959 Bump the version so we can tell these are new style builds 2018-05-18 13:31:05 -07:00
Rob Rix
66d1f8286b Stub in a module for names. 2018-05-18 12:43:28 -04:00
Rob Rix
5a43ed60f4 Stub in a module for ValueRef. 2018-05-18 10:36:23 -04:00
Rob Rix
077335784a Stub in a module for primitives. 2018-05-18 10:11:19 -04:00
Ayman Nadeem
8aad81b775 Merge branch 'master' into java-assignment 2018-05-17 10:42:00 -07:00
Rob Rix
e9238d0ec7 Merge branch 'master' into package-dot-json-parsing 2018-05-16 19:12:08 -04:00
Rob Rix
b2e5ee6d31 The tests depend on hashable. 2018-05-16 16:19:08 -04:00
Timothy Clem
a60ed7bc16 Merge remote-tracking branch 'origin/master' into package-dot-json-parsing 2018-05-16 12:07:13 -07:00
Timothy Clem
f81ea4bff5 s/File/Project b/c that makes more sense to me 2018-05-16 08:38:00 -07:00
Rob Rix
2dd557064d Merge branch 'master' into fix-abstract-semantics 2018-05-16 09:20:00 -04:00
Rob Rix
ae74957342 🔥 the unused call graph analysis. 2018-05-16 09:08:07 -04:00
Timothy Clem
3e5b4d5dbb Merge remote-tracking branch 'origin/master' into package-dot-json-parsing 2018-05-15 15:58:19 -07:00
Rob Rix
47e92a766f Merge remote-tracking branch 'origin/master' into fix-abstract-semantics 2018-05-15 18:47:47 -04:00
Timothy Clem
4ef324f512 Merge remote-tracking branch 'origin/master' into package-dot-json-parsing 2018-05-15 15:04:13 -07:00
Rob Rix
70c28fa288 Stub in a module for term evaluators. 2018-05-15 11:40:10 -04:00
Rob Rix
16f07a17d1 🔥 Output. 2018-05-14 18:40:22 -04:00
Rob Rix
8d190c2930 Factor the ts-parse command into its own module. 2018-05-14 14:57:19 -04:00
Rob Rix
02e14169e9 🔥 Rendering.SExpression. 2018-05-14 10:59:47 -04:00
Rob Rix
68df562f23 Stub in a module for serializing to s-expressions. 2018-05-11 14:41:10 -04:00
Rob Rix
539c769ecc Stub in a module for the details of DOT serialization. 2018-05-11 14:07:53 -04:00
Rob Rix
eb82239f8d Stub in a module for serialization formats. 2018-05-11 13:27:09 -04:00
Rob Rix
ffd787a762 Rename Rendering.DOT to Rendering.Graph. 2018-05-11 12:57:20 -04:00
Rob Rix
53fab62a0e Stub in a module for graphs. 2018-05-11 12:04:26 -04:00
Rob Rix
db185d5e47 Move Located into Data.Abstract.Address. 2018-05-11 00:09:17 -04:00
Rob Rix
2abfd92678 Bump effects for https://github.com/joshvera/effects/pull/43 2018-05-10 18:27:10 -04:00
Timothy Clem
8e67479d09 Merge remote-tracking branch 'origin/master' into package-dot-json-parsing 2018-05-10 10:01:01 -07:00
Rob Rix
2b1d976f6a Rename Control.Abstract.ModuleTable to Control.Abstract.Modules. 2018-05-08 16:59:25 -04:00
Rob Rix
52cfb56f54 Rename the Label module to Goto. 2018-05-08 10:37:50 -04:00
Rob Rix
c427be3670 Stub in a spec for Evaluator. 2018-05-07 14:21:05 -04:00
Rob Rix
29c755a8dc Sort the test modules. 2018-05-07 14:20:56 -04:00
Rob Rix
eabb3b79a1 Move the evaluated module table accessors into their own module. 2018-05-07 12:20:23 -04:00
Rob Rix
f2288e3d69 Move the Environment accessors into their own module. 2018-05-07 12:17:32 -04:00
Rob Rix
3c73571b0c Move currentModule/currentPackage into their own module. 2018-05-07 12:14:14 -04:00
Rob Rix
de5a46dc6c Move JumpTable, Label, label, and goto into their own module. 2018-05-07 12:12:11 -04:00
Rob Rix
0d1b025823 Move the Exports accessors into their own module. 2018-05-07 12:04:12 -04:00
Rob Rix
5d91cfd843 Move the roots functionality into its own module. 2018-05-07 11:58:30 -04:00
Rob Rix
531f941692 Provide a module re-exporting all the various abstract interpretation machinery. 2018-05-07 11:51:56 -04:00
Rob Rix
57ddf31ec5 Move the Heap accessors into their own module. 2018-05-07 11:49:59 -04:00
Rob Rix
920ddd893f Move the configuration accessor into its own module. 2018-05-07 11:49:47 -04:00
Rob Rix
2a1c7f17b3 🔥 microlens. 2018-05-07 08:46:40 -04:00
Rob Rix
4f69f5e3de Merge branch 'master' into scope-effects-to-evaluation 2018-05-06 22:50:04 -04:00
Rob Rix
f9ed9766fb Link the tests against fastsum. 2018-05-06 17:22:32 -04:00
Rob Rix
5f0d80a6b1 🔥 the Bad* modules. 2018-05-06 17:16:10 -04:00
Rob Rix
71d5eebbab 🔥 Erroring. 2018-05-06 16:44:04 -04:00
Rob Rix
dcb771a29e 🔥 the TypeChecking module. 2018-05-06 16:41:36 -04:00
Rob Rix
63269866fc Merge pull request #1811 from github/add-fastsum
Add the fastsum package as a dependency.
2018-05-06 15:23:37 -04:00
Rob Rix
30b8002394 🔥 Origin altogether. 2018-05-06 13:25:28 -04:00
Rob Rix
93895186cf Imagine there’s no MonadAnalysis.
It’s easy if you try.
2018-05-04 18:37:37 -04:00
Timothy Clem
07399487fd Ability to get nodejs resolution info out of package.json files 2018-05-03 16:14:54 -07:00
Patrick Thomson
b6f8853d5b Add the fastsum package as a dependency. 2018-05-02 15:59:22 -04:00
Rob Rix
50a3fecfe3 Rename our Union type to Sum. 2018-05-02 11:25:44 -04:00
Rob Rix
171d349eee Define our own Union type. 2018-05-02 10:59:30 -04:00
joshvera
19f0672f34 Separate import graphs into call graph and import graph analyses 2018-05-01 18:10:25 -04:00
joshvera
1f2e234549 Add CallGraph 2018-05-01 17:51:24 -04:00
Ayman Nadeem
b1c05d6755 Merge remote-tracking branch 'origin/master' into java-assignment 2018-05-01 10:57:21 -07:00
Rob Rix
013b5cb4b7 Merge branch 'master' into analyses-provide-and-handle-effects 2018-04-30 14:22:09 -04:00
Timothy Clem
da89a11fae Introduce place to put all these directives 2018-04-26 13:43:49 -07:00
Rob Rix
2066b33aaf Rename Empty to Lower. 2018-04-25 18:25:02 -04:00
Rob Rix
2267f24ea8 Merge branch 'master' into analyses-provide-and-handle-effects 2018-04-25 16:43:00 -04:00
Rob Rix
6646c8ca27 Rename Quietly to BadSyntax. 2018-04-25 15:44:44 -04:00
Patrick Thomson
35a85e6a06 Merge branch 'master' into resumable-type-errors 2018-04-25 15:19:36 -04:00
Timothy Clem
2da5acf57a Add ability to exclude directories from globbing 2018-04-25 09:55:05 -07:00
Rob Rix
0b0bd2a1a8 🔥 Control.Effect.Fresh in favour of Control.Monad.Effect.Fresh. 2018-04-25 10:40:58 -04:00
Rob Rix
1cedeac8e1 Move Erroring into its own module. 2018-04-24 18:44:23 -04:00
Patrick Thomson
89c1403f89 WIP 2018-04-24 14:12:28 -04:00
Timothy Clem
156246e477 Finding a need for a File datatype 2018-04-20 11:10:27 -07:00
joshvera
04428df6bd Return holes from uninitialized address errors 2018-04-19 13:12:51 -04:00
Timothy Clem
42f680fc47 Merge remote-tracking branch 'origin/fix-graph-errors' into typescript-graphs 2018-04-17 14:24:41 -07:00
Timothy Clem
8120b2af73 Merge remote-tracking branch 'origin/master' into typescript-graphs 2018-04-17 14:24:10 -07:00
Timothy Clem
95b7fd5888 Resolve module import paths that walk up directory structure (e.g. ../) 2018-04-17 14:13:01 -07:00
joshvera
3a19dae1f9 Add a Declarations class 2018-04-17 16:25:11 -04:00
Charlie Somerville
560642579f add Data.Empty typeclass 2018-04-17 16:31:08 +10:00
Ayman Nadeem
65b0afa477 Merge remote-tracking branch 'origin/master' into java-assignment 2018-04-10 14:06:07 -07:00
Rob Rix
d863d282b1 🔥 the Mergeable spec. 2018-04-09 16:38:28 -04:00
Rob Rix
bfd2c6b210 🔥 Data.Align.Generic. 2018-04-09 16:18:12 -04:00
Timothy Clem
bf5af4ec21 Move to Graph.hs 2018-04-09 10:57:12 -07:00
joshvera
1f441ec518 Merge remote-tracking branch 'origin/master' into repo-import-graph 2018-04-05 19:50:59 -04:00
Rob Rix
98084c5e81 Merge branch 'master' into task-in-eff 2018-04-05 09:18:32 -04:00
Rob Rix
9dc1d6e5f8 🔥 Semantic. 2018-04-04 15:43:46 -04:00
Patrick Thomson
faf246ff1e Merge remote-tracking branch 'origin/master' into fix-scientific-parsing 2018-04-04 15:40:51 -04:00
Rob Rix
8ae61645f8 Rename Semantic.Command.{Diff,Parse} to Semantic.{Diff,Parse}. 2018-04-04 15:17:01 -04:00
Rob Rix
113bbd1ed9 Merge branch 'master' into task-in-eff 2018-04-04 15:05:28 -04:00
Rob Rix
a5dd989db2 Stub in separate parse/diff command modules. 2018-04-04 13:14:25 -04:00
joshvera
7dd6bb1865 Merge remote-tracking branch 'origin/module-resolution' into repo-import-graph 2018-04-04 13:03:21 -04:00
Timothy Clem
a34cc8766f Merge remote-tracking branch 'origin/master' into module-resolution 2018-04-04 09:42:39 -07:00
Rob Rix
2d521ecaa6 Merge branch 'master' into task-in-eff 2018-04-04 11:58:58 -04:00
Rob Rix
ca87d9cff9 Move the Telemetry effect into its own module. 2018-04-04 11:23:32 -04:00
Rob Rix
6dd7dd78c1 Sort the modules. 2018-04-04 11:23:21 -04:00
Rob Rix
8a6d9bd879 Move Distribute into its own module. 2018-04-04 11:23:13 -04:00
Patrick Thomson
45a411f6ba Merge remote-tracking branch 'origin/master' into fix-scientific-parsing 2018-04-04 10:11:59 -04:00
joshvera
c759c065be Add another analysis to recover from RubyError 2018-04-03 19:59:39 -04:00
Patrick Thomson
c36256e943 Standardize and fix floating-point parsing.
The existence of #1705 showed me that it's time to remove the bandaid
of a fix that was `normalizeFloatString` in #1537. This patch
introduces a proper Attoparsec parser for Scientific values that
handles the vaguaries of cross-language floating-point syntax. We
already depended on Attoparsec indirectly, so adding it as an explicit
dependency is fine.

A unit test is included, with examples taken from the tree-sitter corpora.
2018-04-03 17:02:56 -04:00
joshvera
bc91a5f320 Merge remote-tracking branch 'origin/module-resolution' into repo-import-graph 2018-04-03 16:35:33 -04:00
joshvera
7b9de5d151 Merge remote-tracking branch 'origin/master' into repo-import-graph 2018-04-03 16:19:22 -04:00
Timothy Clem
208d16e131 Disable import-graph specs for now 2018-04-03 10:12:20 -07:00
Rob Rix
37cc2e36bb 🔥 Control.Effect.NonDet. 2018-04-02 10:14:57 -04:00
Rob Rix
228ec0ea59 Stub in a module for a package abstraction. 2018-03-30 11:34:42 -04:00
Rob Rix
366120bd24 Stub in a module for an Origin datatype. 2018-03-29 23:08:59 -04:00
Rob Rix
5ee3bf001e Merge branch 'simpler-analysis-types' into symbol-resolution 2018-03-29 20:00:01 -04:00
Rob Rix
fb38332849 Stub in a module for located names/values/whatever. 2018-03-29 09:00:25 -04:00
joshvera
233f7abfbd Add BadValues analysis 2018-03-28 17:42:11 -04:00
joshvera
e8db080923 Merge remote-tracking branch 'origin/master' into less-fail 2018-03-28 13:12:20 -04:00
joshvera
9043193e13 Merge remote-tracking branch 'origin/master' into less-fail 2018-03-28 12:01:58 -04:00
Josh Vera
6bb737c18f Merge branch 'master' into combined-state-effects 2018-03-28 11:56:17 -04:00
Josh Vera
c79f178fc1 Merge branch 'master' into matching 2018-03-28 11:45:57 -04:00
Rob Rix
5ae24ddc89 Merge branch 'master' into combined-state-effects 2018-03-28 08:33:19 -04:00
Charlie Somerville
3fe504c97e add BadVariable analysis catching FreeVariableError 2018-03-28 12:06:33 +11:00
Patrick Thomson
034bb562d4 Introduce tree-automata DSL for filtering and matching ASTs.
This patch adds the `Matcher` monad, which is capable of filtering any
recursive data structure, bottom-up, yielding a list of (or an
optional) result. These functions are probably going to be used over
`Term` values, so API is provided to wrap common projection functions.

The API was more or less copied directly from that of Clang's AST
matching facilities.

There are a lot of things we can do in the future:
* Binding results yielded in matchers to associated names, for future
  transformation stages to look up and modify.
* Actual transformation stages.
* Optimizations. This is not very fast.

A million thanks to @robrix, whose sage advice managed to turn my
kooky idea for an API into something really special and exciting.
2018-03-27 16:14:30 -04:00
Rob Rix
d596b0a7c6 🔥 the dependency on TH. 2018-03-27 15:01:35 -04:00
Timothy Clem
724d8f38aa Fix up pulling out go package name for import rendering 2018-03-26 12:02:27 -07:00
joshvera
859c4702b0 Merge remote-tracking branch 'origin/master' into default-typeapplications 2018-03-26 13:18:21 -04:00
Rob Rix
58b6c5ab04 Make lenses for EvaluatingState. 2018-03-26 13:13:59 -04:00
joshvera
126cdc5285 Make typeapplications a default extension 2018-03-26 12:00:19 -04:00
Rob Rix
44f03209c4 Stub in a module for a quiet analysis. 2018-03-26 10:02:20 -04:00
Rob Rix
598c02ce21 Merge branch 'master' into imports,-graphed 2018-03-26 09:46:08 -04:00
Rob Rix
b221649b75 Merge branch 'master' into evaluate-in-the-outer-analysis 2018-03-26 09:40:42 -04:00
Rob Rix
2e228604cf Merge branch 'master' into imports,-graphed 2018-03-24 00:35:50 -04:00
Josh Vera
745eb85ee7 Merge branch 'master' into preludes-and-subclassing 2018-03-23 15:26:41 -04:00
Rob Rix
85650c06df Merge branch 'master' into imports,-graphed 2018-03-23 15:26:11 -04:00
Rob Rix
9c0b5f7ab6 Merge branch '🔥-ghc-mod' into imports,-graphed 2018-03-23 10:26:13 -04:00
Josh Vera
7792356012 Merge branch 'master' into default-extensions 2018-03-22 15:43:31 -04:00
Patrick Thomson
1e2fc5f6d3 Merge remote-tracking branch 'origin/master' into preludes-and-subclassing 2018-03-22 12:50:16 -04:00
Josh Vera
3ef6366649 Merge branch 'master' into php-namespaces 2018-03-22 12:23:57 -04:00
joshvera
f2169e09a9 Move MultiParamTypeClasses, StandaloneDeriving, and DataKinds to default-extensions 2018-03-22 12:23:11 -04:00
Patrick Thomson
6f0f20deea thread default environments properly throughout the stack 2018-03-22 12:03:17 -04:00
Rob Rix
f476eb22bd Stub in a Data.Abstract.Module module. 2018-03-21 17:59:16 -04:00
Rob Rix
56dbd8b6a1 Copy the CallGraph stuff into a new module. 2018-03-21 17:58:47 -04:00
Rob Rix
0b2b27ff21 Stub in an AppMerge semigroup. 2018-03-21 16:40:56 -04:00
Timothy Clem
7fdc5e2fda Write a small spec for evaluating PHP includes 2018-03-19 14:42:31 -07:00
Patrick Thomson
dd1e1c555d Merge remote-tracking branch 'origin/master' into classes 2018-03-19 15:45:43 -04:00
Rob Rix
95f13be61f Merge branch 'master' into doctests 2018-03-19 12:35:14 -04:00
Patrick Thomson
d419ad8bf6 Merge remote-tracking branch 'origin/master' into classes 2018-03-19 12:31:34 -04:00
Rob Rix
f720c86e1f Build with as many cores as we can muster. 2018-03-19 10:20:10 -04:00
Rob Rix
476286834f Set -threaded on the doctests.
This is intended as a workaround for  https://github.com/commercialhaskell/stack/issues/3807
2018-03-19 10:19:48 -04:00
Rob Rix
b7bb4ccf72 Link QuickCheck in until we integrate LeanCheck. 2018-03-19 09:53:21 -04:00
Rob Rix
c5f27206ab Build the doctests with -dynamic so they can load the .dylibs for the parsers. 2018-03-19 09:23:11 -04:00
Rob Rix
5fc81f8566 Rename the fresh/nondet modules to not conflict with the effects package. 2018-03-19 09:23:11 -04:00
Rob Rix
bbb51588e5 Add a doctest component. 2018-03-19 09:23:11 -04:00
Ayman Nadeem
0a596261de Merge remote-tracking branch 'origin' into java-assignment 2018-03-16 14:59:28 -07:00
Timothy Clem
e580051a66 Merge remote-tracking branch 'origin/master' into build-fix-em-ups 2018-03-16 13:57:37 -07:00