trait SpaceLogic

abstract space logic

Constructors

Members

[+] def canDecompose ( tp: Type ) : Boolean

Is the type tp decomposable? i.e. all values of the type can be covered by its decomposed types.

Abstract sealed class, OrType, Boolean and Java enums c...

Is the type tp decomposable? i.e. all values of the type can be covered by its decomposed types.

Abstract sealed class, OrType, Boolean and Java enums can be decomposed.

[+] def decompose ( tp: Type ) : List [ Space ]

Get components of decomposable types

Get components of decomposable types

[+] def flatten ( space: Space ) : List [ Space ]

Flatten space to get rid of Or for pretty print

Flatten space to get rid of Or for pretty print

[+] def intersect ( a: Space , b: Space ) : Space

Intersection of two spaces

Intersection of two spaces

[+] def isEqualType ( tp1: Type , tp2: Type ) : Boolean

Is tp1 the same type as tp2?

Is tp1 the same type as tp2?

[+] def isSubType ( tp1: Type , tp2: Type ) : Boolean

Is tp1 a subtype of tp2?

Is tp1 a subtype of tp2?

[+] def isSubspace ( a: Space , b: Space ) : Boolean

Is a a subspace of b? Equivalent to a - b == Empty, but faster

Is a a subspace of b? Equivalent to a - b == Empty, but faster

[+] def minus ( a: Space , b: Space ) : Space

The space of a not covered by b

The space of a not covered by b

[+] def signature ( tp: Type ) : List [ Type ]

Return term parameter types of the case class tp

Return term parameter types of the case class tp

[+] def simplify ( space: Space ) : Space

Simplify space using the laws, there's no nested union after simplify

Simplify space using the laws, there's no nested union after simplify