1
1
mirror of https://github.com/github/semantic.git synced 2024-12-21 05:41:54 +03:00
Commit Graph

986 Commits

Author SHA1 Message Date
Rob Rix
cd7e67c30d Remove the convenience functions. 2015-10-15 11:16:27 -04:00
Rob Rix
b4ea7b70bc Use the Diff/Patch constructors in the tests. 2015-10-15 11:16:21 -04:00
Rob Rix
9e80e0c903 Add a Delete constructor to Free when used as a diff. 2015-10-15 11:11:06 -04:00
Rob Rix
ce633f555a Add an Insert constructor to Free when used as a diff. 2015-10-15 11:10:35 -04:00
Rob Rix
8366dc752a Add a Replace constructor to Free when used as a Diff. 2015-10-15 11:10:16 -04:00
Rob Rix
787681eafc Construct an algorithm. 2015-10-15 11:07:35 -04:00
Rob Rix
98d333d721 Test equality, otherwise replace. 2015-10-15 11:04:37 -04:00
Rob Rix
6f71a42509 Running takes a pair of Terms. 2015-10-15 11:03:15 -04:00
Rob Rix
0cedf87540 Interpreter has a Diff typealias. 2015-10-15 11:01:35 -04:00
Rob Rix
a9f5075d3e Interpreter has an equality function. 2015-10-15 11:00:49 -04:00
Rob Rix
22cb1e00d5 Abstract Interpreter over a TermType. 2015-10-15 11:00:27 -04:00
Rob Rix
1a4151b2a9 Stub in running. 2015-10-15 10:58:57 -04:00
Rob Rix
28c5fb81a2 Rename B to Result. 2015-10-15 10:49:39 -04:00
Rob Rix
30e9ac9106 Stub in docs for Interpreter. 2015-10-15 10:45:32 -04:00
Rob Rix
6a955d5e88 Stub in Interpreter. 2015-10-15 10:45:11 -04:00
Rob Rix
a7192afc47 Merge branch 'patch-costs-are-proportional-to-the-size-of-their-trees' into interpreter 2015-10-15 10:42:02 -04:00
Rob Rix
dfa34aa13c Merge branch 'master' into patch-costs-are-proportional-to-the-size-of-their-trees 2015-10-15 09:48:15 -04:00
Rob Rix
260a317194 Merge branch 'master' into restrict-comparisons-by-category
Conflicts:
	prototype/Doubt.xcodeproj/project.pbxproj
2015-10-15 09:47:49 -04:00
Rob Rix
48234b71c2 Remove Hash. 2015-10-15 09:44:40 -04:00
Rob Rix
77a32f9e8d Remove Patch hashing. 2015-10-15 09:44:36 -04:00
Rob Rix
f30d2d609a Remove Syntax hashing. 2015-10-15 09:43:51 -04:00
Rob Rix
1cbc04100d Remove Free hashing. 2015-10-15 09:43:27 -04:00
Rob Rix
8b5a269d5e Remove Cofree hashing. 2015-10-15 09:43:23 -04:00
Rob Rix
9ac09dea2c Remove Category. 2015-10-15 09:40:36 -04:00
Rob Rix
6fcfed8f37 Remove Info. 2015-10-15 09:39:20 -04:00
Rob Rix
9cc446b4ea Merge branch 'master' into patch-costs-are-proportional-to-the-size-of-their-trees
Conflicts:
	prototype/Doubt/Patch.swift
	prototype/Doubt/TermType.swift
	prototype/DoubtTests/SESTests.swift
2015-10-15 09:32:36 -04:00
Rob Rix
f0d5e1c05d This got pulled in twice due to a cherry-pick followed by a merge.
I didn’t know that was even possible.
2015-10-15 09:29:26 -04:00
Rob Rix
c022085919 Merge branch 'master' into restrict-comparisons-by-category
Conflicts:
	prototype/Doubt.xcodeproj/project.pbxproj
	prototype/Doubt/Fix.swift
2015-10-15 09:28:21 -04:00
Rob Rix
59947a6581 Rename TermType.out to TermType.unwrap. 2015-10-15 09:18:55 -04:00
Rob Rix
cb5dde7bb1 Remove Fix. 2015-10-15 09:17:55 -04:00
Rob Rix
3d8027b6a1 Fix is no longer a TermType. 2015-10-15 09:17:40 -04:00
Rob Rix
3763d7354f Remove the constrained extension providing JSON from diffs when their terms are Fix<A>.
This was not easy to reproduce with Cofree because you can’t introduce
a type variable to constrain the annotation to.
2015-10-15 09:16:49 -04:00
Rob Rix
dd48510b65 Original terms can be recovered without annotations. 2015-10-15 09:12:34 -04:00
Rob Rix
3356a11805 Remove the redundant Free/Fix construction.
This was handled by Free/TermType construction.
2015-10-15 09:09:58 -04:00
Rob Rix
89720c8e65 Test SES over Cofree terms. 2015-10-15 09:08:30 -04:00
Rob Rix
adca66f66c Define parameterized equality over TermType. 2015-10-15 09:05:40 -04:00
Rob Rix
a40ae08ac5 Correct a comment. 2015-10-15 09:01:07 -04:00
Rob Rix
18d19173c0 Remove the Fix → Cofree constructor. 2015-10-15 08:58:48 -04:00
Rob Rix
70b7e56b9c Remove Doc. 2015-10-15 08:55:53 -04:00
Rob Rix
ca922b2283 Free is no longer CustomDocConvertible. 2015-10-15 08:55:26 -04:00
Rob Rix
2bfe2e2eab Fix is no longer CustomDocConvertible. 2015-10-15 08:55:01 -04:00
Rob Rix
064e5f1faa Patch is no longer CustomDocConvertible. 2015-10-15 08:54:33 -04:00
Rob Rix
eba7c9bfbd Remove DocTests.swift. 2015-10-15 08:54:04 -04:00
Rob Rix
31eb3f2b4a Syntax is no longer CustomDocConvertible. 2015-10-15 08:53:46 -04:00
Rob Rix
f55ceade22 Replace the fixtures with newer, even more exciting ones. 2015-10-14 21:10:09 -04:00
Rob Rix
b93a605b37 Document cata. 2015-10-14 21:07:30 -04:00
Rob Rix
e582f28972 Charge a constant cost for the tests. 2015-10-14 18:51:52 -04:00
Rob Rix
7c099bac6f Parameterize SES by the cost function. 2015-10-14 18:51:18 -04:00
Rob Rix
230394bde2 Charge diffs a cost proportional to their size.
This can no longer be done in SES, as it requires knowledge that the
elements of the arrays are of TermType.
2015-10-14 18:51:07 -04:00
Rob Rix
32c55fd5ff Add a section for PatchConvertible. 2015-10-14 18:48:15 -04:00
Rob Rix
b4a9564747 TermType has a size property. 2015-10-14 18:47:20 -04:00
Rob Rix
b0cb77ae74 Define catamorphisms over TermTypes. 2015-10-14 18:42:20 -04:00
Rob Rix
606614ffdf 🔥 Info. 2015-10-14 18:09:24 -04:00
Rob Rix
90b7ac4b21 Equals-or-intersects. 2015-10-14 18:08:56 -04:00
Rob Rix
5fccc3586c Test that uncategorized terms are unrestricted. 2015-10-14 17:51:40 -04:00
Rob Rix
c75b2c134e Correct the test of disjoint categorization to assign unique categories to each term. 2015-10-14 17:51:31 -04:00
Rob Rix
742fc0ea0f Correct the categorization test.
This implies that uncategorized nodes can be compared with anything.
2015-10-14 17:51:01 -04:00
Rob Rix
2aef2114c3 Test that comparisons are unrestricted by default. 2015-10-14 17:47:07 -04:00
Rob Rix
1134f7a9e9 Add a fixture for an unrestricted diff. 2015-10-14 17:46:50 -04:00
Rob Rix
90864e397b Avoid an annotation. 2015-10-14 17:46:41 -04:00
Rob Rix
0cb72943b1 Rename the test case. 2015-10-14 17:44:19 -04:00
Rob Rix
d9e7798dde Test that comparisons of disjoint-categorized terms are restricted. 2015-10-14 17:41:51 -04:00
Rob Rix
1f23ec9e47 Extract the diff into a private global. 2015-10-14 17:39:53 -04:00
Rob Rix
48a9a741c7 Merge branch 'master' into restrict-comparisons-by-category 2015-10-14 17:36:47 -04:00
joshvera
46010e3096 Merge branch 'master' into diff-cofree-values 2015-10-14 16:49:28 -04:00
Josh Vera
df31170dc8 Merge pull request #107 from github/generalize-patch
Generalize Patch
2015-10-14 16:47:57 -04:00
Josh Vera
d49986c671 Merge pull request #102 from github/charge-a-constant-cost-to-patches
Charge a constant cost to patches
2015-10-14 16:47:47 -04:00
Rob Rix
025d43379e Merge branch 'master' into diff-cofree-values 2015-10-14 16:46:07 -04:00
Rob Rix
4690ae6533 Merge branch 'master' into generalize-patch 2015-10-14 16:45:33 -04:00
Josh Vera
99c4e8556e Merge pull request #109 from github/literal-syntax-construction
Literal syntax construction
2015-10-14 16:44:25 -04:00
Rob Rix
7a03f09fe9 Test that comparisons are restricted by nil returns from recur. 2015-10-14 16:43:08 -04:00
Matt Diephouse
6eff8d6f82 Merge pull request #101 from github/parameterize-algorithm-evaluation-by-comparison-restriction
Parameterize Algorithm evaluation by comparison restriction
2015-10-14 16:42:03 -04:00
Rob Rix
e0692770b3 Cofree is CustomDebugStringConvertible. 2015-10-14 16:40:13 -04:00
Rob Rix
bf48944c83 Diff equality. 2015-10-14 16:32:01 -04:00
Rob Rix
92ec5b6130 Define parameterized equality over TermType. 2015-10-14 16:31:32 -04:00
Rob Rix
ed10ec1257 Write the fixtures using the typealias. 2015-10-14 16:10:23 -04:00
Rob Rix
35617fee70 Add typealiases for Diff and Term. 2015-10-14 16:09:58 -04:00
Rob Rix
ff559845d8 Add a couple of fixtures. 2015-10-14 16:07:07 -04:00
Rob Rix
9a6e8dea03 Merge branch 'literal-syntax-construction' into restrict-comparisons-by-category 2015-10-14 16:03:54 -04:00
Rob Rix
86df4c6a87 Syntax is DictionaryLiteralConvertible. 2015-10-14 16:03:14 -04:00
Rob Rix
76ca906097 Syntax is ArrayLiteralConvertible. 2015-10-14 16:02:33 -04:00
Rob Rix
0c78e344ad Stub in a test suite for Algorithm. 2015-10-14 15:57:58 -04:00
Rob Rix
124d45a549 Cofree has categories when B: Categorizable. 2015-10-14 15:49:23 -04:00
Rob Rix
b60abdf5b0 Factoring. 2015-10-14 15:46:19 -04:00
Rob Rix
3117d26464 Fix up the categorization. 2015-10-14 15:44:58 -04:00
Rob Rix
6d0bfdb9d0 Add an evaluate method parameterized by categorization. 2015-10-14 15:43:24 -04:00
Rob Rix
80bda88082 Merge branch 'diff-cofree-values' into restrict-comparisons-by-category
Conflicts:
	prototype/Doubt/SES.swift
	prototype/DoubtTests/SESTests.swift
2015-10-14 15:35:18 -04:00
Rob Rix
105b57566b Replace the JSON fixtures with much cooler JSON fixtures. 2015-10-14 14:40:47 -04:00
Rob Rix
ed004ca4c1 Annotate terms with their sizes. 2015-10-14 14:40:21 -04:00
Rob Rix
645e038982 Compute the size of syntax trees. 2015-10-14 14:32:26 -04:00
Rob Rix
6b781622b6 Add the annotations to the JSON. 2015-10-14 14:22:19 -04:00
Rob Rix
abd037796a Annotate JSON with integers. 2015-10-14 14:21:12 -04:00
Rob Rix
1fc7771918 Int is CustomJSONConvertible. 2015-10-14 14:20:58 -04:00
Rob Rix
f34af098d3 String is CustomJSONConvertible. 2015-10-14 14:20:13 -04:00
Rob Rix
29001b713c Diff JSON in Cofree. 2015-10-14 14:17:56 -04:00
Rob Rix
07690849a6 Convenience for constructing Cofree with autoclosures. 2015-10-14 14:17:29 -04:00
Rob Rix
9afc487776 Cofree is a TermType. 2015-10-14 14:05:43 -04:00
Rob Rix
714f99638e Abstract Algorithm over a Term type. 2015-10-14 14:04:47 -04:00
Rob Rix
7e9a41dfbd Make the Roll case indirect. 2015-10-14 14:04:35 -04:00
Rob Rix
b8dca6fe2a Call evaluate with equality. 2015-10-14 14:03:46 -04:00