Skip to content

Commit

Permalink
Merge pull request #33 from typelift/broomburgo-patch-1
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
broomburgo authored Dec 8, 2017
2 parents 2db6162 + 31f63e5 commit 68fcd8e
Show file tree
Hide file tree
Showing 17 changed files with 42 additions and 27 deletions.
9 changes: 9 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[submodule "Carthage/Checkouts/FileCheck"]
path = Carthage/Checkouts/FileCheck
url = https://github.com/trill-lang/FileCheck.git
[submodule "Carthage/Checkouts/SwiftCheck"]
path = Carthage/Checkouts/SwiftCheck
url = https://github.com/typelift/SwiftCheck.git
[submodule "Carthage/Checkouts/Operadics"]
path = Carthage/Checkouts/Operadics
url = https://github.com/typelift/Operadics.git
20 changes: 12 additions & 8 deletions Abstract.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@
38A14E501F2A2DAB00A2900C /* SwiftCheck.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 0951F2421F09690200EA362C /* SwiftCheck.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
38A14E521F2A2DC300A2900C /* SwiftCheck.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 0951F2441F09690200EA362C /* SwiftCheck.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
38A14E531F2A2DCB00A2900C /* SwiftCheck.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0951F2441F09690200EA362C /* SwiftCheck.framework */; };
38E185801FD7E50700208B0A /* Arbitrary.generated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 387A1DBF1F7909A000928A8C /* Arbitrary.generated.swift */; };
38E185811FD7E50700208B0A /* CustomArbitraryTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 387A1DC01F7909A000928A8C /* CustomArbitraryTypes.swift */; };
38E185821FD7E50800208B0A /* Arbitrary.generated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 387A1DBF1F7909A000928A8C /* Arbitrary.generated.swift */; };
38E185831FD7E50800208B0A /* CustomArbitraryTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 387A1DC01F7909A000928A8C /* CustomArbitraryTypes.swift */; };
38E185841FD7E50900208B0A /* Arbitrary.generated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 387A1DBF1F7909A000928A8C /* Arbitrary.generated.swift */; };
38E185851FD7E50900208B0A /* CustomArbitraryTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 387A1DC01F7909A000928A8C /* CustomArbitraryTypes.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -672,7 +678,9 @@
buildActionMask = 2147483647;
files = (
380A4B321F1BF83B002D70E0 /* SemiringTests.generated.swift in Sources */,
38E185831FD7E50800208B0A /* CustomArbitraryTypes.swift in Sources */,
380A4B211F1BE383002D70E0 /* MonoidTests.generated.swift in Sources */,
38E185821FD7E50800208B0A /* Arbitrary.generated.swift in Sources */,
380A4B1B1F1B775F002D70E0 /* WrapperTests.generated.swift in Sources */,
380A4B161F1B7336002D70E0 /* SemigroupTests.generated.swift in Sources */,
380A4B261F1BF5BE002D70E0 /* CommutativeMonoidTests.generated.swift in Sources */,
Expand Down Expand Up @@ -709,7 +717,9 @@
buildActionMask = 2147483647;
files = (
380A4B331F1BF83B002D70E0 /* SemiringTests.generated.swift in Sources */,
38E185851FD7E50900208B0A /* CustomArbitraryTypes.swift in Sources */,
380A4B221F1BE383002D70E0 /* MonoidTests.generated.swift in Sources */,
38E185841FD7E50900208B0A /* Arbitrary.generated.swift in Sources */,
380A4B1C1F1B775F002D70E0 /* WrapperTests.generated.swift in Sources */,
380A4B171F1B7336002D70E0 /* SemigroupTests.generated.swift in Sources */,
380A4B271F1BF5BF002D70E0 /* CommutativeMonoidTests.generated.swift in Sources */,
Expand Down Expand Up @@ -768,7 +778,9 @@
buildActionMask = 2147483647;
files = (
380A4B311F1BF83B002D70E0 /* SemiringTests.generated.swift in Sources */,
38E185811FD7E50700208B0A /* CustomArbitraryTypes.swift in Sources */,
380A4B201F1BE383002D70E0 /* MonoidTests.generated.swift in Sources */,
38E185801FD7E50700208B0A /* Arbitrary.generated.swift in Sources */,
380A4B1A1F1B775F002D70E0 /* WrapperTests.generated.swift in Sources */,
380A4B151F1B7336002D70E0 /* SemigroupTests.generated.swift in Sources */,
380A4B251F1BF5BD002D70E0 /* CommutativeMonoidTests.generated.swift in Sources */,
Expand Down Expand Up @@ -848,7 +860,6 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_SWIFT_FLAGS = "-DXCODE_BUILD";
PRODUCT_BUNDLE_IDENTIFIER = com.typelift.Abstract;
PRODUCT_NAME = Abstract;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -909,7 +920,6 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_SWIFT_FLAGS = "-DXCODE_BUILD";
PRODUCT_BUNDLE_IDENTIFIER = com.typelift.Abstract;
PRODUCT_NAME = Abstract;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -1097,7 +1107,6 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_SWIFT_FLAGS = "-DXCODE_BUILD";
PRODUCT_BUNDLE_IDENTIFIER = com.typelift.Abstract;
PRODUCT_MODULE_NAME = "$(PRODUCT_NAME:c99extidentifier)";
PRODUCT_NAME = Abstract;
Expand Down Expand Up @@ -1166,7 +1175,6 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_SWIFT_FLAGS = "-DXCODE_BUILD";
PRODUCT_BUNDLE_IDENTIFIER = com.typelift.Abstract;
PRODUCT_MODULE_NAME = "$(PRODUCT_NAME:c99extidentifier)";
PRODUCT_NAME = Abstract;
Expand Down Expand Up @@ -1363,7 +1371,6 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_SWIFT_FLAGS = "-DXCODE_BUILD";
PRODUCT_BUNDLE_IDENTIFIER = com.typelift.Abstract;
PRODUCT_MODULE_NAME = "$(PRODUCT_NAME:c99extidentifier)";
PRODUCT_NAME = Abstract;
Expand Down Expand Up @@ -1432,7 +1439,6 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_SWIFT_FLAGS = "-DXCODE_BUILD";
PRODUCT_BUNDLE_IDENTIFIER = com.typelift.Abstract;
PRODUCT_MODULE_NAME = "$(PRODUCT_NAME:c99extidentifier)";
PRODUCT_NAME = Abstract;
Expand Down Expand Up @@ -1510,7 +1516,6 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_SWIFT_FLAGS = "-DXCODE_BUILD";
PRODUCT_BUNDLE_IDENTIFIER = com.typelift.Abstract;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SDKROOT = macosx;
Expand Down Expand Up @@ -1579,7 +1584,6 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_SWIFT_FLAGS = "-DXCODE_BUILD";
PRODUCT_BUNDLE_IDENTIFIER = com.typelift.Abstract;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SDKROOT = macosx;
Expand Down
3 changes: 2 additions & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
github "trill-lang/FileCheck" "0.0.5"
github "typelift/Operadics" "0.2.3"
github "typelift/SwiftCheck" "0.8.1"
github "typelift/SwiftCheck" "0.9.1"
1 change: 1 addition & 0 deletions Carthage/Checkouts/FileCheck
Submodule FileCheck added at 1c9665
1 change: 1 addition & 0 deletions Carthage/Checkouts/Operadics
Submodule Operadics added at bc8cdd
1 change: 1 addition & 0 deletions Carthage/Checkouts/SwiftCheck
Submodule SwiftCheck added at df82fb
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The library also provides tools to test the concrete types for the axioms requir

## Setup

`Abstract` is compatible with [Carthage](https://github.com/Carthage/Carthage): please refer to Carthage documentation for how to add `Abstract` as a dependency of your project.
To clone `Abstract` please run `git clone REPOSITORY_URL --recursive` to properly clone submodules.

### SwiftPM
Please add this line to your `Package.swift` file's dependencies section:
Expand All @@ -30,6 +30,9 @@ Please add this line to your `Package.swift` file's dependencies section:

To use the structures in this library, add `"Abstract"` to your target's dependencies. To additionally test algebraic laws with the framework, add `"Abstract"` as a dependency to the relevant `testTarget`s.

### Carthage
`Abstract` is compatible with [Carthage](https://github.com/Carthage/Carthage): please refer to Carthage documentation for how to add `Abstract` as a dependency of your project.

------

## How to use this
Expand Down Expand Up @@ -323,7 +326,7 @@ struct Process<T> {
}
```

Let's also assume that we have a bunch of processes that we want to run, and then combine all the values into a single one. Running all the processes in sequence and then collecting all the values could be tedious and inefficient, but running them in parallel, maybe in a distributed way, could be dangerous, unpredictable and hard to coordinate.
Let's also assume we have a bunch of processes that we want to run, and then combine all the values into a single one. Running all the processes in sequence and then collecting all the values could be tedious and inefficient, but running them in parallel, maybe in a distributed way, could be dangerous, unpredictable and hard to coordinate.

We would like to take advantage of the abstract algebraic structures defined in `Abstract` to simplify the problem. Everything depends on the `T` value: it turns out that, if `T` has certain properties, we can actually run our processes in a distributed and efficient way without any risk.

Expand Down
2 changes: 1 addition & 1 deletion Sources/Abstract/BoundedSemilattice.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A Bounded Semilattice is a Commutative Monoid in which the operation is idempote
a <> b <> b = a <> b
*/

#if !XCODE_BUILD
#if SWIFT_PACKAGE
import Operadics
#endif

Expand Down
2 changes: 1 addition & 1 deletion Sources/Abstract/CommutativeMonoid.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A Commutative Monoid is a Monoid in which the operation is commutative, thus:
a <> b = b <> a
*/

#if !XCODE_BUILD
#if SWIFT_PACKAGE
import Operadics
#endif

Expand Down
2 changes: 1 addition & 1 deletion Sources/Abstract/Homomorphism.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if !XCODE_BUILD
#if SWIFT_PACKAGE
import Operadics
#endif

Expand Down
2 changes: 1 addition & 1 deletion Sources/Abstract/Magma.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Technically, to prove this, we could test the operation with a large number of r
So let's keep it on word (for now).
*/

#if !XCODE_BUILD
#if SWIFT_PACKAGE
import Operadics
#endif

Expand Down
2 changes: 1 addition & 1 deletion Sources/Abstract/Monoid.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The empty element (let's called it `e`) has to be neutral to the operation both
a <> e = e <> a = a
*/

#if !XCODE_BUILD
#if SWIFT_PACKAGE
import Operadics
#endif

Expand Down
2 changes: 1 addition & 1 deletion Sources/Abstract/Semigroup.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A Semigroup is a Magma where the composition operation is associative, which mea
To put it simply: (a <> b) <> c = a <> (b <> c)
*/

#if !XCODE_BUILD
#if SWIFT_PACKAGE
import Operadics
#endif

Expand Down
2 changes: 1 addition & 1 deletion Sources/Abstract/Semiring.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ In addition to the basic requirements for the underlying types (Commutative Mono
- the `zero` element must "annihilate" an instance if applied with the multiplication operation, both left and right:
- zero <>* a = a <>* zero = zero
*/
#if !XCODE_BUILD
#if SWIFT_PACKAGE
import Operadics
#endif

Expand Down
2 changes: 1 addition & 1 deletion Sources/Abstract/Utilities/Collections.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Becuase we have a way to generically "compose" things, we can derive a bunch of interesting operations on collections of such things.
*/

#if !XCODE_BUILD
#if SWIFT_PACKAGE
import Operadics
#endif

Expand Down
6 changes: 3 additions & 3 deletions Tests/AbstractTests/Utility/CustomArbitraryTypes.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import XCTest
@testable import Abstract
#if !XCODE_BUILD
import Operadics
#endif
import SwiftCheck
#if SWIFT_PACKAGE
import Operadics
#endif

struct TestStructure: Arbitrary, BoundedSemilattice, Equatable {
let get: Max<Int>
Expand Down
5 changes: 0 additions & 5 deletions deployments.xcconfig

This file was deleted.

0 comments on commit 68fcd8e

Please sign in to comment.