Module

Perspectives.Representation.Class.Role

#RoleClass

class (Show r, Identifiable r i, PersistentType r i) <= RoleClass r i | r -> i, i -> r where

Members

Instances

#getRole'

getRole' :: forall r i. RoleClass r i => i -> MonadPerspectives r

#getCalculation'

#includeBinding

includeBinding :: forall r i a. RoleClass r i => Eq a => (r -> Array a) -> (ADT EnumeratedRoleType -> MP (Array a)) -> r -> MP (Array a)

A pattern of computation shared in the recursive computation of roleAspects, properties and views of a role. It computes the local value for an EnumeratedRole and then the value of the binding of the role, returning the union of the two.

#contextOfADT

contextOfADT :: ADT EnumeratedRoleType -> MP (ADT ContextType)

The context of an ADT

#bindingOfADT

#functional'

functional' :: ADT EnumeratedRoleType -> MP Boolean

A functional role can be filled with a relational role (but then we need to select). E.g.: one of the party-goers was the driver. Vice versa can we fill a relational role with a functional role: In the canteen, a bus driver can order a coffee. Hence, we need not take the binding of a role into account in order to determine whether it is functional.

#mandatory'

mandatory' :: ADT EnumeratedRoleType -> MP Boolean

As with functional, we need not take the binding of a role into account in order to determine whether it is mandatory.

#propertiesOfADT

propertiesOfADT :: ADT EnumeratedRoleType -> MP (Array PropertyType)

Properties of a role's binding count as properties of the role itself.

#roleAspectsOfADT

roleAspectsOfADT :: ADT EnumeratedRoleType -> MP (Array EnumeratedRoleType)

Aspects of the binding of a role count as aspects of the role itself.

#expansionOfADT

expansionOfADT :: ADT EnumeratedRoleType -> MP (ADT EnumeratedRoleType)

An ADT is fully expanded iff expanding any of the simple types (ST) results in the same type (the expansion is the fixpoint). Expand a reference to an EnumeratedType to a type that includes its binding . E.g.: ST (EnumeratedRoleType e), where the binding of e is ST (EnumeratedRoleType e1) and e1 has binding EMPTY becomes PROD [ST (EnumeratedRoleType e), PROD [ST (EnumeratedRoleType e1), EMPTY]]

#Role

#id

id :: forall r i. RoleClass r i => r -> i

#rangeOfRoleCalculation

rangeOfRoleCalculation :: RoleType -> MonadPerspectives (ADT EnumeratedRoleType)

The range of the computation of the RoleType. Does not include the binding, for (ENR (EnumeratedRoleType e)).

Modules