1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00
Commit Graph

12430 Commits

Author SHA1 Message Date
Patrick Thomson
ac3a79ccbf change liftNumeric to be over Values 2018-03-13 11:21:05 -04:00
Patrick Thomson
807be3af29 Merge remote-tracking branch 'origin/master' into boolean-arithmetic-evaluation 2018-03-13 11:19:14 -04:00
Patrick Thomson
a36ce7e4e3 change liftNumeric to be over Values 2018-03-13 11:16:07 -04:00
Rob Rix
d136112abe Use putGlobalEnv instead of modifyGlobalEnv with const. 2018-03-13 11:08:25 -04:00
Patrick Thomson
03fccbde97 Merge remote-tracking branch 'origin/master' into while-evaluation 2018-03-13 11:00:57 -04:00
Patrick Thomson
19aa6a7300 comparison operators 2018-03-13 10:54:26 -04:00
Rob Rix
6d40ceba39 Comment out extraRoots to silence a warning.
We’re going to need it eventually but I’m not diving all the way down this rabbit hole just yet.
2018-03-13 10:54:21 -04:00
Rob Rix
e1fabf863b Rename the type parameter. 2018-03-13 10:24:21 -04:00
Rob Rix
9662ac23fb Use LiveFor/CellFor to tighten up some signatures. 2018-03-13 10:23:58 -04:00
Rob Rix
93e9d04c2f ValueRoots assumes the location type from the value type. 2018-03-13 10:22:15 -04:00
Rob Rix
1c826b5d6f Define a LiveFor synonym. 2018-03-13 10:21:45 -04:00
Rob Rix
f7cb9e7098 🔥 the MonadGC interface. 2018-03-13 10:10:30 -04:00
Rob Rix
235f982c91 Define getConfiguration to use askRoots. 2018-03-13 10:06:50 -04:00
Rob Rix
55310af7a8 Fix up the MonadAnalysis instance’s constraints. 2018-03-13 10:03:09 -04:00
Rob Rix
935e213cf3 Derive the extra instances. 2018-03-13 10:03:00 -04:00
Rob Rix
fb3b76fe3c Re-enable askRoots. 2018-03-13 10:02:54 -04:00
Rob Rix
ebdeb11db0 Merge branch 'decompose-monad-evaluator' into garbage-collecting 2018-03-13 09:58:27 -04:00
Rob Rix
8f6128c6e4 Merge branch 'master' into decompose-monad-evaluator 2018-03-13 09:48:14 -04:00
Timothy Clem
69b2c5c64d Sort out spechelper again with new interfaces 2018-03-12 16:13:21 -07:00
Timothy Clem
af66a0c229 Merge remote-tracking branch 'origin/typescript-exports' into import-language-tour 2018-03-12 15:40:22 -07:00
Timothy Clem
cc4fd12428 Merge remote-tracking branch 'origin/more-typescript-imports' into typescript-exports 2018-03-12 15:37:12 -07:00
Timothy Clem
08c59a43d2 Merge remote-tracking branch 'origin/master' into typescript-exports 2018-03-12 15:30:28 -07:00
Patrick Thomson
ce1a3d1e78 Merge remote-tracking branch 'origin/master' into tuples-and-variable-declarations 2018-03-12 16:56:42 -04:00
Patrick Thomson
578bb5c566 unnecessary import 2018-03-12 16:52:32 -04:00
Timothy Clem
c35cf73715 Go import from path parsing 2018-03-12 13:52:28 -07:00
Timothy Clem
a87f31fca2 Hack to handle Go modules defined across multiple files 2018-03-12 13:52:04 -07:00
Timothy Clem
2134325379 Helper to evaluate Go files 2018-03-12 13:51:33 -07:00
Rob Rix
ad07ee0fff Merge branch 'master' into decompose-monad-evaluator 2018-03-12 16:45:41 -04:00
Rob Rix
0e9ed4e9ae Use evaluateModule in load instead of evaluateTerm. 2018-03-12 15:59:19 -04:00
Rob Rix
32240e2864 Merge branch 'master' into re-enable-tracing-analyses 2018-03-12 15:59:00 -04:00
Rob Rix
3639743e73 📝 modifyModuleTable. 2018-03-12 15:35:09 -04:00
Rob Rix
76ba8963a9 📝 the new typeclasses. 2018-03-12 15:34:37 -04:00
Rob Rix
15771c5dc6 Explicitly list the Evaluator exports. 2018-03-12 15:32:55 -04:00
Rob Rix
3aa6a783cd 🔥 the default definition of getConfiguration.
This should enable us to wrap it s.t. using -XGeneralizedNewtypeDeriving will call overloads in downstream analyses.
2018-03-12 15:31:36 -04:00
Rob Rix
a1a7b8e3cc modifyGlobalEnv is strict in the new env. 2018-03-12 15:23:30 -04:00
Rob Rix
db80ec7afa modifyModuleTable is strict in the new table. 2018-03-12 15:23:07 -04:00
Rob Rix
23cc1eafc4 modifyStore is strict in the new store. 2018-03-12 15:21:28 -04:00
Rob Rix
b060a7a83a Move assign into Control.Abstract.Evaluator. 2018-03-12 15:19:28 -04:00
Rob Rix
49c63fac0a Simplify the MonadAddressable interfaces to use MonadStore. 2018-03-12 15:16:50 -04:00
Rob Rix
b32eaa967b Merge branch 'master' into re-enable-tracing-analyses 2018-03-12 15:13:50 -04:00
Rob Rix
8e9375c08b Replace askRoots with getConfiguration directly. 2018-03-12 15:09:51 -04:00
Patrick Thomson
3372c1a7ef Merge remote-tracking branch 'origin/master' into show-constraints 2018-03-12 15:02:22 -04:00
Rob Rix
6a53cf8da9 Factor the ModuleTable interface out of MonadEvaluator. 2018-03-12 14:59:42 -04:00
Rob Rix
591785cdbb Factor the Environment interface out of MonadEvaluator. 2018-03-12 14:55:27 -04:00
Rob Rix
84a59eeaf8 Factor the Store interface out of MonadEvaluator. 2018-03-12 14:51:49 -04:00
Rob Rix
f70ee19ce7 🔥 diffPatch 2018-03-12 14:45:22 -04:00
Rob Rix
26107bf1a0 Disallow specialization of getConfiguration. 2018-03-12 14:44:27 -04:00
Rob Rix
1ff21bf120 Collect after analyzing each term. 2018-03-12 14:42:52 -04:00
Rob Rix
845dcdfb80 Re-add the gc/reachable functions. 2018-03-12 14:38:50 -04:00
Rob Rix
efb70fbf7e Require a reader for the live set. 2018-03-12 14:36:59 -04:00
Rob Rix
9d7d604fb6 Define a MonadGC instance when we have a live set in the effects. 2018-03-12 14:36:13 -04:00
Rob Rix
d39c5758b9 Define MonadGC. 2018-03-12 14:35:57 -04:00
Rob Rix
8d1b80e599 Define a simple passthrough Collecting analysis. 2018-03-12 14:31:24 -04:00
Patrick Thomson
dfc4d786e5 documentation 2018-03-12 14:24:36 -04:00
Rob Rix
31dae8f671 🔥 Control.Monad.Effect.GC. 2018-03-12 14:24:28 -04:00
Patrick Thomson
e8c7389ffe Evaluatable instances for VariableDeclarations and tuple literals.
The VariableDeclaration instance just shells out to that for
Assignment, but required the addition of a concrete tuple typle for
cases such as `var x = 1, y = 2`. As an added bonus, we now get tuple
evaluations in Python.

This required a rejiggering of the Value type in Data.Abstract.Value -
it is now a newtype over the union that contains another Value type
recursively, analogous how Fix ties the knot over infinitely-nested
Functor values.
2018-03-12 14:19:29 -04:00
Timothy Clem
8ebcd5a864 Merge remote-tracking branch 'origin/master' into import-language-tour 2018-03-12 10:03:25 -07:00
Rob Rix
7794d9423b Merge branch 'master' into re-enable-tracing-analyses 2018-03-12 12:09:13 -04:00
Rob Rix
4e4a61f8fb Tweak to the docs for gather. 2018-03-12 11:42:46 -04:00
Rob Rix
35718fca96 Resume taking an explicit constructor in gather so it doesn’t have to be annotated with the type. 2018-03-12 11:42:14 -04:00
Rob Rix
82c578ed0d 📝 raise & lower. 2018-03-12 11:39:51 -04:00
Rob Rix
80f5a4e024 🔥 redundant extensions. 2018-03-12 11:37:56 -04:00
Rob Rix
fa4a74c3c1 Give a kind signature for Effectful’s parameter. 2018-03-12 11:37:23 -04:00
Rob Rix
5c415fee15 📝 Effectful. 2018-03-12 11:37:06 -04:00
Rob Rix
0171811da4 📝 trace. 2018-03-12 11:34:37 -04:00
Rob Rix
b21de35de8 More spacing. 2018-03-12 11:31:32 -04:00
Rob Rix
8cb9298f4c 📝 EvaluatingEffects. 2018-03-12 11:24:30 -04:00
Rob Rix
ecd0252c9c 📝 analyzeTerm. 2018-03-12 11:23:33 -04:00
Patrick Thomson
668fc45e63 add evaluateGoFile 2018-03-12 11:23:14 -04:00
Rob Rix
a222b10ded 📝 Caching’s RequiredEffects. 2018-03-12 11:22:15 -04:00
Rob Rix
63f8b113fd 📝 the CachingEffects list. 2018-03-12 11:21:13 -04:00
Rob Rix
3ef27e495f Spacing. 2018-03-12 11:19:52 -04:00
Patrick Thomson
8bebe26ea9 use the canonical definition of interface 2018-03-12 11:18:14 -04:00
Rob Rix
3bcb30dd67 📝 runAnalysis. 2018-03-12 11:17:42 -04:00
Patrick Thomson
8334619f95 DRY 2018-03-12 11:15:21 -04:00
Rob Rix
c4fa7d54a9 📝 RequiredEffects. 2018-03-12 11:14:23 -04:00
Rob Rix
e77553a3f0 📝 MonadCaching. 2018-03-12 11:11:49 -04:00
Patrick Thomson
547c2103b1 Merge remote-tracking branch 'origin/master' into go-evaluation 2018-03-12 11:09:56 -04:00
Rob Rix
7f70c6d7e7 📝 CachingAnalysis. 2018-03-12 10:45:17 -04:00
Patrick Thomson
6f6f90ac3b Add Show constraint to MonadValue to improve error messages.
Someday we will probably want our own bespoke `Debug` class so as to
save on compile times associated with generating `Show` instances. But
this is fine for now, and will also improve #1547.
2018-03-12 10:42:52 -04:00
Rob Rix
00a6c1ad3d 📝 runAnalysis. 2018-03-12 10:38:32 -04:00
Rob Rix
52afe01b00 Reformat the signature for runAnalysis. 2018-03-12 10:37:35 -04:00
Rob Rix
848e78f959 📝 liftAnalyze. 2018-03-12 10:36:51 -04:00
Rob Rix
d615c38132 🔥 liftEvaluate. 2018-03-12 10:35:22 -04:00
Rob Rix
06be4ab967 📝 evaluateModule. 2018-03-12 10:33:27 -04:00
Rob Rix
a6c1b3663d 🔥 some unnecessary qualification. 2018-03-12 10:29:45 -04:00
Rob Rix
1e3f4a0481 Give a type signature for parseFile. 2018-03-12 10:27:53 -04:00
Rob Rix
8101cde85e Slightly less clever definition of parseFile. 2018-03-12 10:27:24 -04:00
Rob Rix
c4f11ea6f3 Import monoidal maps under Monoidal. 2018-03-12 10:22:55 -04:00
Timothy Clem
a6bb1452dc Fix up TypeScript fromClause to support relatives paths hack 2018-03-09 15:54:29 -08:00
Patrick Thomson
019940401c no TypeApplications necessary 2018-03-09 18:19:54 -05:00
Patrick Thomson
5bd1ff40ef Implement evaluation over Arithmetic operations. 2018-03-09 18:13:09 -05:00
Timothy Clem
750cfc6b17 Merge remote-tracking branch 'origin/typescript-exports' into more-typescript-imports 2018-03-09 12:46:58 -08:00
Rob Rix
56db84b3f2 🔥 the Bifoldable/Bitraversable instances for Subterm. 2018-03-09 15:42:22 -05:00
Rob Rix
53517662cf Roll caching an action into MonadCaching. 2018-03-09 15:37:34 -05:00
Rob Rix
fbd5c04227 Better API for isolating the cache & caching new values. 2018-03-09 15:21:12 -05:00
Rob Rix
a5704f49df Improve the API for running an action with a new oracle. 2018-03-09 15:07:50 -05:00
Rob Rix
6535209dc9 Improve the API for consulting the oracle. 2018-03-09 15:06:18 -05:00
Rob Rix
346e2115e2 Evaluate the module in the underlying analysis. 2018-03-09 14:58:10 -05:00
Rob Rix
2109310e9e 🔥 memoizeEval. 2018-03-09 14:57:33 -05:00
Rob Rix
a717bd54f7 Converge for the whole module, not per-term. 2018-03-09 14:57:09 -05:00
Rob Rix
e0076f3fb6 Leave the default signature alone. 2018-03-09 14:46:28 -05:00
Rob Rix
546f8bb3ec modifyGlobalEnv is not primitive. 2018-03-09 14:41:27 -05:00
Rob Rix
b3efd3b1e2 putStore is primitive. 2018-03-09 14:40:30 -05:00
Rob Rix
8966824307 Rename lift to raise. 2018-03-09 14:36:16 -05:00
Rob Rix
d3ed05fe99 Derive a bunch more instances. 2018-03-09 14:32:48 -05:00
Rob Rix
06e0645f83 Rename CachingAnalysis to Caching. 2018-03-09 14:30:33 -05:00
Rob Rix
26295e0008 Rename DeadCodeAnalysis to DeadCode. 2018-03-09 14:30:01 -05:00
Rob Rix
bd9b231a83 Rename TracingAnalysis to Tracing. 2018-03-09 14:29:11 -05:00
Rob Rix
386807618a Only export the Evaluating type, evaluate, and evaluates. 2018-03-09 14:28:34 -05:00
Rob Rix
b2e687afd7 Only export the TracingAnalysis type. 2018-03-09 14:28:25 -05:00
Rob Rix
0d950057f6 Only export the DeadCodeAnalysis type. 2018-03-09 14:27:26 -05:00
Rob Rix
fa14baded7 Only export the CachingAnalysis type. 2018-03-09 14:27:00 -05:00
Rob Rix
9169a6134d Only export CachingAnalysis. 2018-03-09 14:26:30 -05:00
Rob Rix
13a6e14b58 Re-export MonadFresh & MonadNonDet. 2018-03-09 14:25:02 -05:00
Rob Rix
5887d4ef10 🔥 redundant Foldable constraints. 2018-03-09 14:21:14 -05:00
Rob Rix
08a707a7e2 Sort some contexts. 2018-03-09 14:20:53 -05:00
Rob Rix
e48bd18d88 Abstract the caching functions. 2018-03-09 14:19:37 -05:00
Rob Rix
e9ae4bb48b 🔥 the In/Out cache effect synonyms. 2018-03-09 14:13:47 -05:00
Rob Rix
bace1c3d74 Sort imports &c. 2018-03-09 14:11:43 -05:00
Rob Rix
b40d662690 Tidy up language extensions. 2018-03-09 14:08:46 -05:00
Rob Rix
5d99219f86 🔥 the DeadCode synonym. 2018-03-09 14:02:03 -05:00
Rob Rix
ebf7c039cd 🔥 Trace. 2018-03-09 14:01:52 -05:00
Rob Rix
c86a2a0d14 🔥 Tracer. 2018-03-09 14:00:09 -05:00
Rob Rix
621f6f45f0 🔥 a redundant export list. 2018-03-09 13:56:08 -05:00
Rob Rix
ab0adf7dc8 🔥 some redundant imports. 2018-03-09 13:56:00 -05:00
Rob Rix
6a99bb633c 🔥 some redundant constraints. 2018-03-09 13:55:33 -05:00
Rob Rix
bccfdbf4d3 🔥 a bunch of redundant constraints. 2018-03-09 13:36:16 -05:00
Rob Rix
90f6aec2cd Reformat deref & alloc. 2018-03-09 13:35:00 -05:00
Rob Rix
e33af1aa70 Simplify the superclasses of MonadValue. 2018-03-09 13:34:18 -05:00
Rob Rix
14e29254dd Avoid redundant functional dependencies. 2018-03-09 13:33:26 -05:00
Rob Rix
73086d9f63 Use runAnalysis to simplify evaluate/s. 2018-03-09 13:24:40 -05:00
Rob Rix
7702321f95 Eta-reduce the analysis type in runAnalysis. 2018-03-09 13:20:26 -05:00
Rob Rix
411de01585 Remove the effects parameters from MonadEvaluator and MonadAnalysis. 2018-03-09 13:17:48 -05:00
Rob Rix
c7bdb13cc4 🔥 the term & effects parameters from MonadAddressable. 2018-03-09 13:01:11 -05:00
Rob Rix
e224f0c80b 🔥 the effects parameter from MonadValue. 2018-03-09 12:57:20 -05:00
Rob Rix
836a76b2ea EvaluatingEffects doesn’t need to prepend. 2018-03-09 12:24:15 -05:00
Rob Rix
3b31cf1ec8 Merge branch 'master' into re-enable-tracing-analyses 2018-03-09 12:22:06 -05:00
Rob Rix
80035c8fbc Tidy language extensions. 2018-03-09 12:11:07 -05:00
Rob Rix
8299a2de68 Move runAnalysis into Control.Abstract.Analysis. 2018-03-09 12:09:25 -05:00
Rob Rix
97fbda62a4 Turns out yes! 2018-03-09 12:08:24 -05:00
Rob Rix
c0315632ae 🔥 the commented-out PythonTracer synonym. 2018-03-09 12:08:15 -05:00
Rob Rix
3cdbaecc93 Infer the effects to run analyses with. 2018-03-09 12:00:20 -05:00
Patrick Thomson
2e3c1d0715 Remove references to obsolete identifiers. 2018-03-09 11:36:37 -05:00
Patrick Thomson
ca0397ae40 Merge remote-tracking branch 'origin/master' into go-evaluation 2018-03-09 11:24:02 -05:00
Patrick Thomson
a883bf9ada 🔥 Control.Monad.Effect.Cache.
This interface has already been obsoleted—its only consumer has a
private interface for its caching functionality, and @robrix's work
will restore a generalized version. No reason to keep this about.
2018-03-09 11:11:09 -05:00
Rob Rix
0d040911eb Revert "Add a type family for the required effects."
This reverts commit cc352239fd94a6689ae3a03739b2feebbb7372ef.
2018-03-09 11:03:33 -05:00
Rob Rix
1fd764f05e Add a type family for the required effects. 2018-03-09 10:48:50 -05:00
Rob Rix
f68401e6d4 Leave a note to remind myself what the analysis type could be. 2018-03-09 10:32:48 -05:00
Timothy Clem
af376440f4 Re-enable import eval for langs without explicit exports 2018-03-08 15:59:12 -08:00
Timothy Clem
fe1e2635bc Include wildcard symbol here 2018-03-08 15:58:49 -08:00
Timothy Clem
97a5870626 Move so this can be next to other imports 2018-03-08 15:58:35 -08:00
joshvera
53c661ccdf Add DefautlExport term 2018-03-08 18:26:04 -05:00
Timothy Clem
b223668665 Merge remote-tracking branch 'origin/typescript-exports' into more-typescript-imports 2018-03-08 15:19:55 -08:00
joshvera
e473e543f6 Split up QualifiedExport and QualifiedExportFrom 2018-03-08 18:08:43 -05:00
Timothy Clem
a8775d3f0d Update import graph rendering for qualified calls 2018-03-08 15:06:08 -08:00
Timothy Clem
d5b9782f86 Roughly connect the dots between imports for TypeScript 2018-03-08 14:15:42 -08:00
Timothy Clem
3d6a64cfe7 Little more detailed failure when we can't find a single free variable 2018-03-08 14:15:42 -08:00
joshvera
60721252cf Merge remote-tracking branch 'origin/environment-scoping' into typescript-exports 2018-03-08 16:49:14 -05:00
Rob Rix
b4563c0b46 Revert "Abstract the various types over the effect list."
This reverts commit 960c38b41bb1db3466770d93268207ef54ddcc29.
2018-03-08 16:19:44 -05:00
Timothy Clem
642a96a53f Bring back python imports with a little assignment fix 2018-03-08 13:18:13 -08:00
Rob Rix
54c1f0d2e9 Revert "Revert "Revert "Parameterize the typeclasses by the list of effects."""
This reverts commit 81dc8c50484cf7c415eb3f754ca5fbb934517f2a.
2018-03-08 16:17:07 -05:00
joshvera
f75e4b280e Fix WildcardImport
Combine with the global env instead of replacing it outright
2018-03-08 16:02:03 -05:00
Timothy Clem
a74ad46c08 Fix up Go import-graph output and spec 2018-03-08 13:01:13 -08:00
joshvera
aef8814a7d Use withGlobalEnv in QualifiedExport 2018-03-08 15:58:06 -05:00
joshvera
84ae0c2048 Use withGlobalEnv in QualifiedImport 2018-03-08 15:56:40 -05:00
joshvera
a6481b2adc Use withExports in Program 2018-03-08 15:56:29 -05:00
joshvera
2e9e15bdbb Move local state function to effects and add withExports 2018-03-08 15:52:28 -05:00
joshvera
f12e6f4d62 Use withGlobalEnv to constrain the global environment 2018-03-08 15:46:17 -05:00
Rob Rix
3aa0b2eddc Revert "Revert "Parameterize the typeclasses by the list of effects.""
This reverts commit fe9c84af96b4046a0b355094b5eb60ec3cc70a45.
2018-03-08 15:13:27 -05:00
Rob Rix
6b59dee449 Parameterize Effectful by the effect list. 2018-03-08 14:55:06 -05:00
Rob Rix
bbab0c7f69 Revert "Parameterize the typeclasses by the list of effects."
This reverts commit d922393406bce47366f9269f63edbf93b19d13c1.
2018-03-08 14:42:30 -05:00
Rob Rix
95e6de97ee Revert "Refactor the type synonyms a little."
This reverts commit 9ea8b80a185ce32933844f4787989877dd71f0e5.
2018-03-08 14:42:25 -05:00
Rob Rix
9a3cba982d Refactor the type synonyms a little. 2018-03-08 14:42:20 -05:00
Timothy Clem
74675d6731 Fix up TypeScript import-graph output and tests 2018-03-08 11:37:41 -08:00
Rob Rix
1478187f0f Parameterize the typeclasses by the list of effects. 2018-03-08 14:37:37 -05:00
Rob Rix
29dee3a213 Abstract the various types over the effect list. 2018-03-08 14:13:53 -05:00
Rob Rix
a848426b03 🔥 a bunch more redundant constraints. 2018-03-08 13:49:18 -05:00
Timothy Clem
030e6a8acd Need the new ModuleState of Envs 2018-03-08 10:48:44 -08:00
Rob Rix
9f49a4921e 🔥 redundant constraints on eval. 2018-03-08 13:48:17 -05:00
Rob Rix
bda7091467 Sort some constraints. 2018-03-08 13:47:39 -05:00
Rob Rix
4468dee9be 🔥 redundant constraints. 2018-03-08 13:47:18 -05:00
Timothy Clem
1293c9a6d2 Merge remote-tracking branch 'origin/master' into environment-scoping 2018-03-08 10:42:05 -08:00
Rob Rix
1eacebfab8 Align the associated type families. 2018-03-08 13:36:49 -05:00
Rob Rix
eb3fbcc4db Just say coerce. 2018-03-08 13:35:01 -05:00
Rob Rix
abe6415536 🔥 a redundant type signature. 2018-03-08 13:34:33 -05:00
Rob Rix
bf7b397275 🔥 redundant language extensions. 2018-03-08 13:31:36 -05:00
Timothy Clem
43fe86dea6 Revert "newtype wrapper for name and play with friendly show"
This reverts commit a0500f376d91bf671f9f7a80c7371891895939bc.
2018-03-08 10:30:40 -08:00
Rob Rix
ec350c78ff Align some more types. 2018-03-08 13:27:16 -05:00
Timothy Clem
0be58fdbe0 newtype wrapper for name and play with friendly show 2018-03-08 10:25:41 -08:00
Timothy Clem
0751f64ab1 Better error message 2018-03-08 10:24:43 -08:00
Rob Rix
d12a1dafc2 Align the associated types. 2018-03-08 13:24:03 -05:00
Rob Rix
a919fe8fb6 Align some instances. 2018-03-08 13:23:48 -05:00
Rob Rix
38a21bc9de Sort language extensions & imports. 2018-03-08 13:22:40 -05:00
Rob Rix
a862ef9fef Evaluating adds its own effects. 2018-03-08 13:15:55 -05:00
Rob Rix
78be762a0c Use the parser helper for the rest of the evaluators. 2018-03-08 12:51:44 -05:00
Rob Rix
e912723b92 Evaluate Ruby files using the helper. 2018-03-08 12:50:56 -05:00
Rob Rix
5887ba194f Generalize the parser helper over the parser. 2018-03-08 12:50:00 -05:00
Rob Rix
0bbbe11b77 Use parsePythonFile to evaluate. 2018-03-08 12:47:11 -05:00
Rob Rix
b7536a939a Extract a helper to parse Python files. 2018-03-08 12:46:46 -05:00
Rob Rix
f301cb0943 Typecheck and trace using evaluateModule. 2018-03-08 12:46:26 -05:00
Rob Rix
5c65b042c3 Use the simplified RunEffects interface. 2018-03-08 12:42:03 -05:00
Rob Rix
bed985d625 Merge branch 'master' into re-enable-tracing-analyses 2018-03-08 12:39:49 -05:00
Timothy Clem
24a470ba7a FreeVariable Name as NonEmpty List 2018-03-08 09:34:09 -08:00
Timothy Clem
905081cbf1 Remove extra parens 2018-03-08 09:33:12 -08:00
Timothy Clem
50611f2757 Not using this import 2018-03-08 09:04:01 -08:00
Timothy Clem
13b892df53 Adding listable instance uncovered this erroneous test 2018-03-08 09:03:02 -08:00
Rob Rix
d5c74a9ecf Rename Effects to EffectsFor. 2018-03-08 11:41:43 -05:00
Rob Rix
899c62f2fc run takes an 'Effectful' computation instead of 'Eff' directly. 2018-03-08 11:40:02 -05:00
Rob Rix
09d7a59693 Rename the Effects parameter. 2018-03-08 11:37:47 -05:00
Rob Rix
e20fcac374 🔥 evaluateDead. 2018-03-08 11:36:53 -05:00
Rob Rix
a53ed1f39c Define evaluateDead with evaluateModule. 2018-03-08 11:36:18 -05:00
Rob Rix
dbe31824b9 🔥 Evaluator. 2018-03-08 11:35:37 -05:00
Rob Rix
563b43b527 Move Evaluator into the Evaluating module. 2018-03-08 11:31:59 -05:00
Rob Rix
3f358a4cce Rename EvaluatorEffects to EvaluatingEffects. 2018-03-08 11:25:18 -05:00
Rob Rix
fa93a23368 evaluate/evaluates use evaluateModule. 2018-03-08 11:20:09 -05:00
Rob Rix
47b585b58f load calls evaluateModule instead of evaluateTerm. 2018-03-08 11:15:02 -05:00
Rob Rix
f38cb76dc4 🔥 a redundant language extension. 2018-03-08 11:14:44 -05:00
Rob Rix
d7ec06267b Don’t allow specialization of evaluateTerm. 2018-03-08 11:14:12 -05:00
Rob Rix
85fc0ba564 Add Recursive (TermFor m) as a superclass of MonadAnalysis. 2018-03-08 11:14:00 -05:00
Rob Rix
e275b4ba4c Define evaluateModule for DeadCodeAnalysis. 2018-03-08 11:10:59 -05:00
Rob Rix
4f085d6707 liftAnalyze takes the algebra to lift. 2018-03-08 11:10:08 -05:00
Rob Rix
ff6f99fbf5 Sort the context. 2018-03-08 11:08:32 -05:00
Rob Rix
7982b8ddf4 Use equality constraints to name the term/value type parameters. 2018-03-08 11:08:05 -05:00
Rob Rix
72ddeeedf6 Rename delegateAnalyzeTerm to liftAnalyze. 2018-03-08 11:06:10 -05:00
Rob Rix
f1b4770ff1 Define a helper to lift an evaluator into an underlying type. 2018-03-08 11:04:31 -05:00
Rob Rix
ca6b18e743 🔥 redundant imports. 2018-03-08 10:53:19 -05:00
Rob Rix
01f7fd455d Correct the docs for evaluateTerm. 2018-03-08 10:53:02 -05:00
Rob Rix
34387b02e0 Add an evaluateModule method to MonadAnalysis. 2018-03-08 10:52:55 -05:00
Rob Rix
9fa05c9b61 Define a convenience for evaluating Python with dead code and tracing analyses. 2018-03-08 10:50:55 -05:00
Rob Rix
902f269847 evaluateDead returns an analysis. 2018-03-08 10:48:39 -05:00
joshvera
49e3aa4ef7 docs 2018-03-08 10:46:12 -05:00
Rob Rix
114c8a58ac Rename LiftEffect to Effectful. 2018-03-08 10:01:10 -05:00
Rob Rix
02347f7014 Rename Evaluation to Evaluating. 2018-03-08 10:00:31 -05:00
Rob Rix
bce888995a Abstract CachingAnalysis over the underlying analysis. 2018-03-07 21:50:44 -05:00
Rob Rix
45a0559400 Derive MonadFresh, Alternative, & MonadNonDet instances for Evaluation. 2018-03-07 21:50:28 -05:00
Rob Rix
66ea2f0c3e 🔥 a type annotation. 2018-03-07 21:26:59 -05:00
Rob Rix
9a3e0fe607 Rename a bunch of type parameters. 2018-03-07 21:26:44 -05:00
Rob Rix
5749c50302 Delegate the analysis of terms to the underlying analysis. 2018-03-07 21:20:16 -05:00
Rob Rix
271f3fb786 MonadAnalysis implies MonadEvaluator. 2018-03-07 21:19:05 -05:00
Rob Rix
8551034a1b Re-export Evaluator from Analysis. 2018-03-07 21:18:38 -05:00
Rob Rix
c3de4459aa 🔥 a redundant extension. 2018-03-07 21:15:15 -05:00
Rob Rix
fe7c2e66f8 🔥 redundant kind signatures. 2018-03-07 21:14:55 -05:00
Rob Rix
7e5deee2c3 Define TermFor & ValueFor as associated type families. 2018-03-07 21:14:09 -05:00
Rob Rix
7fbafef56c Move TermFor and ValueFor into Control.Abstract.Evaluator. 2018-03-07 21:12:20 -05:00
Rob Rix
b0f03a021f Spacing. 2018-03-07 21:09:28 -05:00
Rob Rix
c35b1f4f0c 🔥 a bunch of redundant language extensions. 2018-03-07 21:09:26 -05:00
Rob Rix
e71fac7493 🔥 the (wrong, bad) Generic1 instance. 2018-03-07 21:04:17 -05:00
Rob Rix
089b08edb3 🔥 Control.Newtype1. 2018-03-07 21:03:46 -05:00
Rob Rix
1c117beacd 🔥 the re-export of Newtype1. 2018-03-07 21:03:22 -05:00
Rob Rix
ad195fa0cc 🔥 the instance of Newtype1. 2018-03-07 21:03:15 -05:00
Rob Rix
7fb874e5eb Revert "Use -XDerivingStrategies to correct the instances."
This reverts commit af43e435dc87bddf02fd9ccc99e2d08a3990fab3.
2018-03-07 21:02:34 -05:00
Rob Rix
8ac41065ec Define delegateAnalyzeTerm using Coercible. 2018-03-07 21:02:21 -05:00
Rob Rix
7e6ff8674d Use delegateAnalysis. 2018-03-07 20:49:16 -05:00
Rob Rix
4226d0f259 Use -XDerivingStrategies to correct the instances. 2018-03-07 20:49:00 -05:00
Rob Rix
4945fdf575 Sort imports. 2018-03-07 20:41:57 -05:00
Timothy Clem
835e8f5980 Major updates to identifiers: free variables can be qualified names
(break all the tests too 😁)
2018-03-07 17:01:47 -08:00
Rob Rix
35d82b2487 Give a default definition for O1. 2018-03-07 19:15:43 -05:00
Rob Rix
1de12b1119 Reformat the signature for delegateAnalyzeTerm. 2018-03-07 19:08:32 -05:00
Rob Rix
1b004925c4 Derive Generic1 & Newtype1 instances for TracingAnalysis. 2018-03-07 19:04:15 -05:00
Rob Rix
7215f499a0 Define a function delegating term analysis to an underlying MonadAnalysis instance. 2018-03-07 19:04:02 -05:00
Rob Rix
11360000cb Move Newtype1 into its own module. 2018-03-07 19:03:46 -05:00
Rob Rix
f4fcdfecf1 Stub in a module for Newtype1. 2018-03-07 19:02:16 -05:00
Rob Rix
f3ace5ca2a Give an instance of GNewtype1. 2018-03-07 19:00:41 -05:00
Rob Rix
e30a4d3f25 Define default implementations of pack1 and unpack1 for Generic1 types. 2018-03-07 18:56:50 -05:00
Rob Rix
9c49bb2f0c Define a generic Newtype1 analogue. 2018-03-07 18:56:35 -05:00
Rob Rix
d49d2860dd Define a Newtype1 typeclass. 2018-03-07 18:53:31 -05:00
Patrick Thomson
3051ffd147 Merge remote-tracking branch 'origin/master' into floats-scientific 2018-03-07 18:51:50 -05:00
Patrick Thomson
3ba4ddef61 convert to a Scientific in the evaluation stage 2018-03-07 18:51:43 -05:00
Rob Rix
d0a464318e Format analyzeTerm over several lines. 2018-03-07 18:40:05 -05:00
Rob Rix
b9a6d1bda5 Give a tacit definition of trace. 2018-03-07 18:39:41 -05:00
Rob Rix
6b9ae3eb73 🔥 some redundant constraints. 2018-03-07 18:36:16 -05:00
Rob Rix
6ed41a911c Move the Ord constraint on the location into the class methods requiring it. 2018-03-07 18:35:56 -05:00
Rob Rix
704f09083f Abstract the dead code analysis over the underlying analysis. 2018-03-07 18:31:18 -05:00
Rob Rix
d6b04d9858 Rename a bunch of type parameters. 2018-03-07 18:14:45 -05:00
Rob Rix
176142b471 Pull subterms out to the top level. 2018-03-07 18:14:40 -05:00
Rob Rix
ccb66340fd Simplify the constraints on the MonadAnalysis instance. 2018-03-07 18:10:25 -05:00
Rob Rix
7d2cfbe918 🔥 evaluateTrace. 2018-03-07 18:06:15 -05:00
Rob Rix
19ae302c40 Define the tracePythonFile helper w/o evaluateTrace. 2018-03-07 18:05:53 -05:00
Rob Rix
3ec8d65126 🔥 a redundant constraint. 2018-03-07 18:01:44 -05:00
Rob Rix
8b43136fc8 Derive the MonadEvaluator instance directly. 2018-03-07 18:01:37 -05:00
Josh Vera
ca5fa6d5b3 Merge branch 'master' into floats-scientific 2018-03-07 17:49:42 -05:00
Rob Rix
48819ad6ef Merge branch 'master' into analysis-composition 2018-03-07 17:49:30 -05:00
Rob Rix
86fafc5abd Rename AnalysisTerm/Value to Term/ValueFor. 2018-03-07 17:48:20 -05:00
Rob Rix
2490cc1d43 Parameterize TracingAnalysis by the underlying monad. 2018-03-07 17:47:42 -05:00
Rob Rix
c7dbc9842c Provide the effect list via a type family. 2018-03-07 17:46:02 -05:00
Rob Rix
f121205fa4 Define a convenience for applying Tracer to the underlying monad. 2018-03-07 17:37:30 -05:00
Rob Rix
2dc698b3e8 Define a convenience for applying Trace to the underlying monad. 2018-03-07 17:35:40 -05:00
Rob Rix
45fccdc7dc Add a lower method to LiftEffect. 2018-03-07 17:34:17 -05:00
Rob Rix
1f7d9672ea Remove the term/value parameters from TracingAnalysis. 2018-03-07 17:32:05 -05:00
Patrick Thomson
189a33c16b use ModuleTable 2018-03-07 15:35:26 -05:00
Rob Rix
af5f1de520 Redefine the Tracer convenience. 2018-03-07 15:24:29 -05:00
Rob Rix
147c373c29 Define a helper for tracing Python files. 2018-03-07 15:23:36 -05:00
Rob Rix
5846ab7315 trace is of kind * -> *. 2018-03-07 15:23:30 -05:00
Patrick Thomson
8c6ae8145d use ModuleTable 2018-03-07 15:17:16 -05:00
Patrick Thomson
de1717dfd8 Merge remote-tracking branch 'origin/master' into go-evaluation 2018-03-07 15:15:49 -05:00
Rob Rix
ded1c3e5e8 Parameterize the Evaluation analysis by the effect set. 2018-03-07 15:11:44 -05:00
Patrick Thomson
8a738a8760 Merge remote-tracking branch 'origin/master' into resuscitate-caching-analysis 2018-03-07 15:07:01 -05:00
joshvera
a27a60f137 Insert addresses in exports state 2018-03-07 15:06:35 -05:00
Rob Rix
b0de8c5830 Represent term/value types with type families. 2018-03-07 15:05:08 -05:00
joshvera
4c5e098123 Change Exports to a Map 2018-03-07 15:00:36 -05:00
joshvera
1f3ed79c01 Change bindExports to take a Map 2018-03-07 15:00:10 -05:00
joshvera
db9a816163 Map fromClause to Identifier 2018-03-07 14:59:40 -05:00
Patrick Thomson
606a1321dd Merge remote-tracking branch 'origin/master' into floats-scientific 2018-03-07 14:56:10 -05:00
Patrick Thomson
957897fe8c strictify 2018-03-07 14:55:51 -05:00
Patrick Thomson
6c4777a854 add some comments 2018-03-07 14:51:26 -05:00
Patrick Thomson
ad4e7e83f4 Ensure that floats can be evaluated. 2018-03-07 14:46:54 -05:00
Patrick Thomson
4a2d5bda53 necessary changes for floating-point munging 2018-03-07 14:46:26 -05:00
Timothy Clem
a71729d76d Properly capture and flatten qualifiedIdentifiers for python calls 2018-03-07 11:34:50 -08:00
Timothy Clem
2aaa2096ef Actually do need to envUnion here 2018-03-07 11:34:35 -08:00
Rob Rix
16d03caf3d Rename the term/value type parameters. 2018-03-07 13:59:47 -05:00
Rob Rix
94dfeb34ad Abstract TracingAnalysis over the underlying evaluator. 2018-03-07 13:46:51 -05:00
Rob Rix
fb19c9df32 Define Store over a Monoidal Map. 2018-03-07 13:28:29 -05:00
Rob Rix
09650a1330 Define a filterWithKey function for Map. 2018-03-07 13:25:30 -05:00
Rob Rix
6588787368 Define a size function for Map. 2018-03-07 13:24:27 -05:00
Rob Rix
eee6c84553 Simplify cacheInsert further! 2018-03-07 12:50:38 -05:00
Rob Rix
4c1133e593 Simplify cacheInsert. 2018-03-07 12:50:27 -05:00
Rob Rix
52b4609027 Derive a Reducer instance for Cache. 2018-03-07 12:49:06 -05:00
Rob Rix
a8fdeddd6f Define Cache using a Monoidal Map. 2018-03-07 12:46:55 -05:00
Rob Rix
b940eb6e86 Define an insert function for Map. 2018-03-07 12:46:08 -05:00
Rob Rix
2aeab94001 Define a lookup function for Map. 2018-03-07 12:44:05 -05:00
Rob Rix
00942f7073 Re-export the Reducer interface. 2018-03-07 12:40:57 -05:00
Rob Rix
adce2707e2 Explicitly list the exports from Map. 2018-03-07 12:40:36 -05:00
Rob Rix
6981a2a6ce Derive Eq2, Ord2, & Show2 instances for Map. 2018-03-07 12:36:06 -05:00
Rob Rix
104d9f77bf Derive Eq1, Ord1, & Show1 instances for Map. 2018-03-07 12:35:49 -05:00
Rob Rix
f77812bb1e Derive Foldable, Functor, & Traversable instances for Map. 2018-03-07 12:34:57 -05:00
Timothy Clem
524116baf5 Spacing 2018-03-07 09:34:39 -08:00
Timothy Clem
8bb77aaaf1 TODO about qualified Names 2018-03-07 09:33:51 -08:00
Rob Rix
9c7c6ed652 Define a Reducer instance for Map. 2018-03-07 12:30:34 -05:00
Rob Rix
f199e7fa73 Define a Monoid instance for Map. 2018-03-07 12:26:32 -05:00
Rob Rix
303e55b403 Define a Semigroup instance for Map. 2018-03-07 12:25:39 -05:00
Rob Rix
24d37d7f8f Derive Eq, Ord, & Show instances for Map. 2018-03-07 12:23:59 -05:00
Rob Rix
f0f7a6599a Define a Monoidal Map type. 2018-03-07 12:23:31 -05:00
Rob Rix
257a068b3c Stub in a Monoidal map module. 2018-03-07 12:22:52 -05:00
Rob Rix
e5b662f1ba 🔥 the re-export of Pointed. 2018-03-07 12:19:04 -05:00
Rob Rix
e6c9778ec9 Use Set.singleton instead of point to produce the free variables for Identifier. 2018-03-07 12:18:53 -05:00
Rob Rix
5b1187018f Define the RunEffect instance for NonDetEff in terms of Reducer. 2018-03-07 12:18:23 -05:00
Rob Rix
df05cd25e3 Define cacheInsert using the Reducer instance. 2018-03-07 12:13:22 -05:00
Rob Rix
54cf116141 🔥 the Pointed instance for Dead. 2018-03-07 12:11:09 -05:00
Rob Rix
ceb42a0839 Define subterms using the Reducer instance. 2018-03-07 12:09:51 -05:00
Rob Rix
c08b46be04 Derive a Reducer instance for Dead. 2018-03-07 12:07:29 -05:00
Rob Rix
64b0e7f273 Clarify why we’re 'gather'ing into (). 2018-03-07 12:06:39 -05:00
Rob Rix
0f8f302316 Define gather using a Reducer. 2018-03-07 12:04:44 -05:00
Rob Rix
08472f6139 🔥 the Pointed instance for Latest. 2018-03-07 12:00:13 -05:00
Rob Rix
48e1ae7003 Flip the semigroup operator in storeInsert. 2018-03-07 12:00:04 -05:00
joshvera
3ed9162f68 Reset the exports set after evaluating a program 2018-03-07 11:54:58 -05:00
joshvera
a86921e63b Add TODO about prunedEnv 2018-03-07 11:54:40 -05:00
joshvera
3b6d586b6a Docs 2018-03-07 11:53:07 -05:00
joshvera
d176f52ff2 typo 2018-03-07 11:53:00 -05:00
Timothy Clem
5773745839 Merge remote-tracking branch 'origin/master' into environment-scoping 2018-03-07 08:52:53 -08:00