1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 14:21:31 +03:00
Commit Graph

11045 Commits

Author SHA1 Message Date
Rob Rix
31a561751c 📝 liveDelete. 2017-12-20 16:24:17 -05:00
Rob Rix
dae3e8caa3 📝 liveInsert. 2017-12-20 16:23:33 -05:00
Rob Rix
2e65116f11 📝 liveSingleton. 2017-12-20 16:23:05 -05:00
Rob Rix
38baddc489 📝 Live. 2017-12-20 16:22:41 -05:00
Rob Rix
1e546234f2 📝 Cache. 2017-12-20 16:19:32 -05:00
Rob Rix
cb833cfca1 📝 cacheInsert. 2017-12-20 16:18:25 -05:00
Rob Rix
de4a622728 📝 cacheSet. 2017-12-20 16:18:22 -05:00
Rob Rix
59f4107263 Eta-expand cacheInsert. 2017-12-20 16:16:50 -05:00
Rob Rix
2b6e3974c2 Eta-expand cacheSet. 2017-12-20 16:16:03 -05:00
Rob Rix
5488187caf 📝 cacheLookup. 2017-12-20 16:15:06 -05:00
Rob Rix
7f8755b748 📝 envRoots. 2017-12-20 16:13:00 -05:00
Timothy Clem
f26ef5a59a Merge branch 'master' of github.com:github/semantic-diff into integrate-abstract-interpretation 2017-12-20 09:04:55 -08:00
Timothy Clem
26783a5990 Formatting 2017-12-20 08:58:11 -08:00
Timothy Clem
3e2e17f129 More code docs 2017-12-20 08:58:04 -08:00
Timothy Clem
de2fe0816c Few minor function docs 2017-12-20 08:57:46 -08:00
Timothy Clem
c7f164dffe Leave out the symbolic interpreter for now 2017-12-20 08:57:18 -08:00
Rick Winfrey
e56ec0a416 Merge branch 'master' into update-go-assignment 2017-12-19 14:08:14 -08:00
Rick Winfrey
64149bff77 Assign MethodSpecLIst 2017-12-19 13:58:06 -08:00
Rick Winfrey
2ef9c72ed2 Match ArgumentList alias 2017-12-19 13:57:57 -08:00
Rick Winfrey
28003f518e Assign importSpecList 2017-12-19 10:46:34 -08:00
Rick Winfrey
5cc5eb3b8e Assign fieldDeclarationList 2017-12-19 10:46:24 -08:00
Rick Winfrey
28763d1616 Assign argument lists 2017-12-19 10:40:36 -08:00
Rick Winfrey
0df164570e Rename Parameters -> ParameterList 2017-12-19 10:40:26 -08:00
joshvera
99d9b7c97a Merge master into 🔥-monolithic-syntax 2017-12-19 13:09:30 -05:00
Timothy Clem
df09487c42 Eval instance for Return 2017-12-18 15:23:21 -08:00
Timothy Clem
859aa731a5 Merge branch 'master' into integrate-abstract-interpretation 2017-12-18 13:52:10 -08:00
Rob Rix
a112fca6f3 Merge branch 'master' into 🔥-monolithic-syntax 2017-12-18 15:07:00 -05:00
Rob Rix
5f49f4589c Replacements advance past the maximal id in the before state. 2017-12-18 11:29:34 -05:00
Rob Rix
3ae354b750 Bind fewer intermediate variables. 2017-12-18 11:22:03 -05:00
Rob Rix
54621da8d6 Render each node and edge alone on a line. 2017-12-18 11:11:56 -05:00
Rob Rix
ff43062310 Correct how the graph title is constructed. 2017-12-18 11:07:40 -05:00
Rob Rix
3aa6333405 🔥 redundant parens. 2017-12-18 11:02:31 -05:00
Rob Rix
3df9140c0a renderDOTDiff takes its blobs in These. 2017-12-18 10:54:51 -05:00
Rob Rix
c435f8e55a Merge branch 'master' into dot-renderer 2017-12-18 08:41:33 -07:00
Rob Rix
96c94e7672 iterFreer’s algebra takes the continuation & instruction in the opposite order. 2017-12-13 09:18:42 -08:00
Timothy Clem
8e8d2fb41e Merge remote-tracking branch 'origin/master' into bidistribute 2017-12-13 09:14:05 -08:00
Josh Vera
8fa6a723e6 Merge branch 'master' into identifierAlgebra 2017-12-12 15:50:56 -05:00
Josh Vera
3c2edc1833 Merge branch 'master' into dot-renderer 2017-12-12 14:48:18 -05:00
Timothy Clem
5b7df2b3f2 Use new identifier decorator for json output 2017-12-12 11:34:02 -08:00
Timothy Clem
58ebcbfb00 Add IdentifierName decorator 2017-12-12 11:32:12 -08:00
Josh Vera
3b51c592d9 Merge branch 'master' into rws-minus-p-equals-rws 2017-12-12 13:36:03 -05:00
Rick Winfrey
3028946612 Define a default method for the CustomHasCyclomaticComplexity typeclass 2017-12-11 15:39:41 -08:00
Rick Winfrey
01c30abc2d Add single blob parser util function for convenience 2017-12-11 15:39:12 -08:00
Rick Winfrey
3610ec269b Merge branch 'master' into cyclomatic-complexity-decorator 2017-12-11 14:36:08 -08:00
Rick Winfrey
cda1779d64 Update comment 2017-12-11 14:29:30 -08:00
Timothy Clem
143b1b8a12 Document Bidistribute 2017-12-11 12:58:50 -08:00
Timothy Clem
ed47cbc85d Formatting 2017-12-11 12:58:43 -08:00
Timothy Clem
8d7701fd7f Docs 2017-12-11 11:15:29 -08:00
Timothy Clem
30f5b9bd4b Just moving things around 2017-12-11 11:09:37 -08:00
Timothy Clem
deb7ebadd2 🔥 blobOid too 2017-12-11 11:03:00 -08:00
Timothy Clem
ad377910f9 Completely remove blobKind 2017-12-11 10:54:18 -08:00
Timothy Clem
8ce213fc44 No longer need to track blobKind in Maybe 2017-12-11 10:51:52 -08:00
Timothy Clem
844fc3f8b5 Use Join These Blob instead 2017-12-11 09:09:07 -08:00
Timothy Clem
afd82561e9 Minor doc cleanup 2017-12-11 08:27:02 -08:00
Timothy Clem
24d98ad71c Fix up tests 2017-12-10 08:46:17 -08:00
Timothy Clem
01ddc29c82 Fix Util functions 2017-12-09 18:31:01 -08:00
Timothy Clem
c3b6e260cb Simplify effectivePath/Language 2017-12-09 18:30:52 -08:00
Timothy Clem
2315a27e8f Add pathForBlobPair helper 2017-12-09 18:30:37 -08:00
Timothy Clem
f644e968ab Remove imports that aren't needed 2017-12-09 18:30:27 -08:00
Timothy Clem
8dae7da7d4 Fix reading blobPairs from stdin 2017-12-09 18:20:47 -08:00
Timothy Clem
4be8c2a4a1 Implement parBitraversable 2017-12-09 18:14:17 -08:00
Timothy Clem
ff1d9591c7 Take path and lang from after file 2017-12-09 18:13:19 -08:00
Timothy Clem
ba2159e940 First attempt at BlobPair as These and bitraversable 2017-12-09 17:36:48 -08:00
Timothy Clem
46cccd5015 Don't parse blobs that don't exist 2017-12-08 11:42:46 -07:00
Rob Rix
27f7a5778f Reformat the replacement rule. 2017-12-07 10:52:21 -07:00
Rob Rix
1717f2a6a6 Replacements use unique node IDs. 2017-12-07 10:18:44 -07:00
Rob Rix
3b3e5495a1 Allow multiple in-edges per iteration. 2017-12-07 10:14:30 -07:00
Rob Rix
0ba3ec6bd1 Rename graphAlgebra to termAlgebra. 2017-12-07 09:53:29 -07:00
Rob Rix
51affc82a3 Colourize patches. 2017-12-07 09:47:47 -07:00
Rob Rix
a86a50d986 Render diffs to DOT. 2017-12-07 09:36:39 -07:00
Rob Rix
82483e2015 Nodes have a map of attributes. 2017-12-07 09:25:25 -07:00
Rob Rix
d40da054f7 Stub in a title for diff graphs. 2017-12-07 08:44:03 -07:00
Rob Rix
fd6cc2f057 Move the datatypes up a little. 2017-12-07 08:40:44 -07:00
Rob Rix
0bd661b831 Turn on mono local binds. 2017-12-06 13:42:48 -07:00
Rob Rix
b7e3ab1274 Quote the labels. 2017-12-06 13:38:27 -07:00
Rob Rix
b0461325f9 Compute unique names for siblings. 2017-12-06 13:23:22 -07:00
Rob Rix
90349b0abb Terminate Node renderings with semicolons. 2017-12-06 10:18:12 -07:00
Rob Rix
673dd28537 Pick IDs for nodes. 2017-12-06 09:47:40 -07:00
Rob Rix
dde473abd1 Explicitly list the exports. 2017-12-06 09:42:08 -07:00
Rob Rix
0e4f3cfb56 Fold terms into graphs. 2017-12-06 09:41:54 -07:00
Rob Rix
08134d6cec Define renderers for Graphs, Nodes, & Edges. 2017-12-06 09:30:06 -07:00
Rob Rix
e9e0f14248 Define a Monoid instance for Graph. 2017-12-06 09:29:35 -07:00
Rob Rix
d1dd288ec7 Define a Semigroup instance for Graph. 2017-12-06 09:29:27 -07:00
Rob Rix
55308e6fc6 Define Graph, Node, & Edge datatypes. 2017-12-06 09:29:04 -07:00
Rob Rix
30fce0aaf1 Add an eliminator for ConstructorLabel. 2017-12-06 09:14:52 -07:00
Rob Rix
9995d527d5 Pass the blobs to the DOT renderers. 2017-12-06 09:03:10 -07:00
Rob Rix
7fe9c3b2ea Add CLI options for DOT rendering. 2017-12-06 09:01:48 -07:00
Rob Rix
887ea76454 Add DOT term/diff renderers. 2017-12-06 09:01:32 -07:00
Rob Rix
82fc60d524 Re-export the DOT rendering functions. 2017-12-06 09:00:55 -07:00
Rob Rix
4ef26933dc Stub in functions to render to DOT. 2017-12-06 08:58:06 -07:00
Rob Rix
d880f22964 Stub in a module for a DOT renderer. 2017-12-06 08:49:06 -07:00
Rick Winfrey
750c4a6d3e Contextualize specific syntax for function and method declarations
- These assignment rules are two of the only places in Go assignment where individual syntax rules are used. This wraps those syntax rules in `term`, so that they can be contextualized.
2017-12-02 12:44:28 -08:00
Timothy Clem
88700608b6 Formatting and linting 2017-12-01 16:34:36 -08:00
Rick Winfrey
7c1d381530 Turn on Go assignment 2017-12-01 14:45:37 -08:00
Timothy Clem
5ba411c538 Needed to evalute? 2017-12-01 14:20:30 -08:00
Timothy Clem
3382a8ae72 No more alternative python 2017-12-01 14:19:55 -08:00
Timothy Clem
89749e9cc8 Default eval instances for everything! 2017-12-01 14:19:37 -08:00
Rob Rix
d2cb077ddc Don’t assign parent labels to grams. 2017-12-01 17:07:03 -05:00
Rob Rix
99f3633060 Generalize featureVectorDecorator to accept any Hashable label. 2017-12-01 17:00:40 -05:00
Rick Winfrey
21024a0506 🔥 unnecessary language extensions 2017-12-01 13:36:32 -08:00
Timothy Clem
13f029238f Use newtypes 2017-12-01 13:23:33 -08:00
Timothy Clem
1676d949fa Not using fail 2017-12-01 13:23:28 -08:00
Rick Winfrey
7ee4b04c1f Update CyclomaticComplexity 2017-12-01 13:00:30 -08:00
Rob Rix
43237fff1e No need to qualify these names. 2017-12-01 14:44:21 -05:00
Rob Rix
bf26a25cff 📝 why the unsafeCoerce is ok. 2017-12-01 14:42:26 -05:00
Rob Rix
d809e0b81d Only coerce the set itself. 2017-12-01 14:39:20 -05:00
Rick Winfrey
e7a5e88d5e First pass updating CyclomaticComplexity 2017-12-01 11:39:04 -08:00
Rob Rix
3652fd2c63 Rename the live set functions uniquely. 2017-12-01 14:33:41 -05:00
Rob Rix
67f8aedc50 Use Live to represent root sets. 2017-12-01 14:30:05 -05:00
Rob Rix
07ec5e3238 Define insertion into live sets. 2017-12-01 14:28:35 -05:00
Rob Rix
3b315112dc Define Live.delete tacitly. 2017-12-01 14:28:28 -05:00
Rob Rix
67c633f3b0 Define the symmetric difference on live sets. 2017-12-01 14:27:50 -05:00
Rob Rix
40d004a289 Define splitting of live sets. 2017-12-01 14:26:29 -05:00
Rob Rix
de9bdc3e34 Define membership tests on live sets. 2017-12-01 14:24:38 -05:00
Rick Winfrey
df52854ef0 Merge branch 'master' into cyclomatic-complexity-decorator 2017-12-01 11:23:15 -08:00
Rob Rix
0402253012 Construct singleton live sets. 2017-12-01 14:20:45 -05:00
Rob Rix
3050438327 Delete addresses from live sets. 2017-12-01 14:20:06 -05:00
Rob Rix
80058c9807 Spacing. 2017-12-01 14:19:58 -05:00
Rob Rix
915ce45f9f Derive Semigroup & Monoid instances for Live. 2017-12-01 14:16:36 -05:00
Rob Rix
125392bcfc Address is an Ord-homomorphism, so we can just unsafeCoerce everything around. 2017-12-01 14:14:53 -05:00
Rob Rix
0d31aece39 Derive Eq1, Ord1, & Show1 instances for Live. 2017-12-01 14:05:41 -05:00
Rob Rix
4bcbffe827 Define a Generic1 instance for Live. 2017-12-01 14:05:30 -05:00
Rob Rix
ae473f7ad2 Define a Functor instance for Live. 2017-12-01 13:57:56 -05:00
Rob Rix
7c3eb5cfda Define a Live set newtype. 2017-12-01 13:57:38 -05:00
Rob Rix
37b44b513b Add a module for a live set. 2017-12-01 13:57:15 -05:00
Rob Rix
05b35cd747 iterFreer’s algebra takes the continuation & instruction in the opposite order. 2017-12-01 13:54:32 -05:00
Rob Rix
cbeb7371cc There’s just one module now. 2017-12-01 13:47:34 -05:00
Rob Rix
10d6ae7a0f Merge branch 'master' into integrate-abstract-interpretation 2017-12-01 13:46:15 -05:00
Timothy Clem
89dcf0fe61 Don't allow evaluating to Type after all
Evaluating to types should always use evalCache rather than evaluate. Using evaluate will infinite loop on recursive programs. - @robrix
2017-12-01 10:03:02 -08:00
Rob Rix
ecfd121575 Merge branch 'master' into 🔥-monolithic-syntax 2017-12-01 12:28:19 -05:00
Timothy Clem
5862a73334 Evaluation to Types requires NonDetEff and Fresh Effects 2017-12-01 09:21:08 -08:00
Rob Rix
cffe4a757e Merge branch 'master' into update-go-toc-rendering 2017-12-01 11:22:27 -05:00
Rob Rix
404dde2cd9 Derive the instances for Address. 2017-12-01 09:49:33 -05:00
Rob Rix
268d559bd3 Derive the instances for Environment. 2017-12-01 09:49:28 -05:00
Rob Rix
9c84fb0d2a Derive the Eq1, Ord1, & Show1 instances for Configuration. 2017-12-01 09:46:52 -05:00
Rob Rix
5e17e4c183 📝 Address & Precise. 2017-11-30 20:07:21 -05:00
Rob Rix
45d73dec35 Use Pointed & Monoid instead of IsList. 2017-11-30 20:04:00 -05:00
Rob Rix
1543a019f2 Clean up the dead evaluator’s LANGUAGE pragmas. 2017-11-30 19:58:44 -05:00
Rob Rix
9cfad1d275 Clean up the tracing evaluator’s LANGUAGE pragmas. 2017-11-30 19:58:08 -05:00
Rob Rix
f42c2ef375 🔥 ev. 2017-11-30 19:56:44 -05:00
Rob Rix
a9e5619d6c Break the dead evaluator’s dependency on the evaluator. 2017-11-30 19:56:21 -05:00
Rick Winfrey
e18ca5b9d0 Merge branch 'update-go-toc-rendering' of github.com:github/semantic-diff into update-go-toc-rendering 2017-11-30 16:55:40 -08:00
Rick Winfrey
57015bc8bd Update methodSpec assignments to not require return type 2017-11-30 16:55:20 -08:00
Rob Rix
a57a2c0d42 Simplify the Interpreter type synonym. 2017-11-30 19:54:16 -05:00
Rob Rix
16c663bfc9 Break the tracing evaluator’s dependency on the evaluator. 2017-11-30 19:53:55 -05:00
Rob Rix
51b8461be3 Abstract the tracing evaluators over the term type. 2017-11-30 19:49:26 -05:00
Rob Rix
0ac52c4fc3 Break the caching evaluator’s dependency on the evaluator. 2017-11-30 19:46:55 -05:00
Rob Rix
eb042b6032 Abstract the caching evaluator over the term type. 2017-11-30 19:44:43 -05:00
Rob Rix
d66540e574 Rename Abstract.Interpreter.Symbolic to Analysis.Abstract.Symbolic. 2017-11-30 19:42:41 -05:00
Rob Rix
c36c257618 Rename Abstract.Interpreter to Analysis.Abstract.Evaluating. 2017-11-30 19:41:34 -05:00
Rob Rix
333f5249b6 Simplify the LANGUAGE pragmas for Abstract.Interpreter. 2017-11-30 19:39:55 -05:00
Rob Rix
5dfd7fe15c Abstract evaluate over the term type. 2017-11-30 19:38:53 -05:00
Rick Winfrey
3bc8c4cff5 Merge branch 'master' into update-go-toc-rendering 2017-11-30 16:37:14 -08:00
Rob Rix
0e309d54b4 Re-use ev in the Caching analysis. 2017-11-30 19:36:53 -05:00
Rob Rix
9f7c07a2c8 Re-use ev in the Dead analysis. 2017-11-30 19:36:05 -05:00
Rob Rix
d9da859024 Generalize ev over the term type. 2017-11-30 19:35:43 -05:00
Rob Rix
2525992123 Move evCollect & evRoots into their own module. 2017-11-30 19:35:35 -05:00
Rob Rix
8f392661dd Rename Abstract.Interpreter.Caching to Analysis.Abstract.Caching. 2017-11-30 19:27:26 -05:00
Rick Winfrey
35a83422f4 Do less work for more accuracy 2017-11-30 16:26:45 -08:00
Rob Rix
41656cd4f1 Move MonadNonDet into its own module. 2017-11-30 19:24:27 -05:00
Rob Rix
2aa8a601bc Move MonadCacheIn and MonadCacheOut into their own module. 2017-11-30 19:22:17 -05:00
Rob Rix
4695e4c544 Extract Cache into its own module. 2017-11-30 19:16:28 -05:00
Rob Rix
ddecfc41e5 Extract MonadAddress into its own module. 2017-11-30 19:12:18 -05:00
Rick Winfrey
bafff20f3b Tokenize the fun keyword in function declarations 2017-11-30 16:02:16 -08:00
Rob Rix
f1e5080c69 Rename Abstract.Interpreter.Tracing to Analysis.Abstract.Tracing. 2017-11-30 18:57:56 -05:00
Rob Rix
c3f8107046 🔥 some redundant LANGUAGE pragmas in Data.Abstract.Eval. 2017-11-30 18:55:24 -05:00
Rob Rix
6811300401 Move MonadTrace into its own module. 2017-11-30 18:53:58 -05:00
Rob Rix
8d6676aebe Rename Analysis.Abstract.Eval to Data.Abstract.Eval. 2017-11-30 18:51:15 -05:00
Rob Rix
4a64ede395 Rename Abstract.Interpreter.Dead to Analysis.Abstract.Dead. 2017-11-30 18:49:19 -05:00
Rob Rix
e47703a782 Generalize the dead code analysis over the term type. 2017-11-30 18:48:04 -05:00
Rob Rix
c30869e076 Extract MonadDead into its own module. 2017-11-30 18:43:43 -05:00
Rob Rix
15d9bdceb9 🔥 Abstract.Primitive. 2017-11-30 18:38:01 -05:00
Rob Rix
ecae28204e Rename Abstract.Store to Control.Monad.Effect.Store. 2017-11-30 18:35:29 -05:00
Rob Rix
60256cfe30 Extract the Store type into Data.Abstract.Store. 2017-11-30 18:32:05 -05:00
Rob Rix
efbe6988cc Rename Abstract.Value to Data.Abstract.Value. 2017-11-30 18:27:35 -05:00
Rob Rix
576f7774ea Rename Abstract.Type to Data.Abstract.Type. 2017-11-30 18:21:02 -05:00
Rob Rix
e614b818a7 Rename Abstract.Address to Data.Abstract.Address. 2017-11-30 18:08:46 -05:00
Rob Rix
105eb793e1 Rename Abstract.FreeVariables to Data.Abstract.FreeVariables. 2017-11-30 18:02:14 -05:00
Rob Rix
627f6fb731 Rename Abstract.Configuration to Data.Abstract.Configuration. 2017-11-30 17:57:58 -05:00
Rob Rix
536ea7e1b1 Rename Abstract.Environment to Data.Abstract.Environment. 2017-11-30 17:55:18 -05:00
Rob Rix
d3aacd96e6 Rename Abstract.Eval to Analysis.Abstract.Eval. 2017-11-30 17:51:38 -05:00
Rob Rix
2df600835f Move MonadGC into its own module. 2017-11-30 17:43:30 -05:00
Rob Rix
e938875a93 Rename Abstract.Monad.Env to Control.Monad.Effect.Env. 2017-11-30 17:38:19 -05:00
Rob Rix
251520f926 Move MonadFresh into its own module. 2017-11-30 17:33:26 -05:00
Rob Rix
cd8a79a2a9 Fresh operates over TName instead of Int. 2017-11-30 17:24:25 -05:00
Rob Rix
5f8aa1e573 Merge branch 'master' into integrate-abstract-interpretation 2017-11-30 17:16:26 -05:00
Rob Rix
8da948440e Merge branch 'master' into better-generic-show1-instances 2017-11-30 17:10:03 -05:00
Rob Rix
73b2e54a06 Merge branch 'master' into 🔥-monolithic-syntax 2017-11-30 17:09:39 -05:00
Rob Rix
d1da673a9f More docs for F- & R-algebras.
cc @joshvera — I talked a little about open recursion as well.
2017-11-30 17:04:36 -05:00
Rob Rix
755f12a2b4 Simplify the language extensions in the environment module. 2017-11-30 16:02:52 -05:00
Rob Rix
1564d11ecd 🔥 ambiguous types & type applications in Value. 2017-11-30 15:59:36 -05:00
Rob Rix
4d6f982240 🔥 ambiguous types in Store. 2017-11-30 15:58:58 -05:00
Rob Rix
52997e736e 🔥 ambiguous types & type applications in Eval. 2017-11-30 15:57:03 -05:00
Rob Rix
f996b9ddff 🔥 the location parameter to MonadCacheIn & MonadCacheOut. 2017-11-30 15:55:14 -05:00
Rob Rix
3f1a94efb7 🔥 the location parameter to MonadGC. 2017-11-30 15:53:51 -05:00
Rob Rix
e26cc860fd 🔥 the location parameter to MonadEnv. 2017-11-30 15:48:01 -05:00
Rob Rix
9f5a5e0469 Move MonadEnv into its own module. 2017-11-30 15:44:58 -05:00
Rob Rix
609b1a1786 🔥 a few type applications. 2017-11-30 15:38:43 -05:00
Rob Rix
a5c615e095 Specialize MonadStore to use the location for the given value type. 2017-11-30 15:35:07 -05:00
Rob Rix
57f531edf2 Move envLookupOrAlloc to Abstract.Store. 2017-11-30 14:46:26 -05:00