Hets - the Heterogeneous Tool Set

Copyright(c) Till Mossakowski, and Uni Bremen 2002-2006
LicenseGPLv2 or higher, see LICENSE.txt
Maintainertill@informatik.uni-bremen.de
Stabilityprovisional
Portabilitynon-portable (overlapping instances, dynamics, existentials)
Safe HaskellNone

Logic.Grothendieck

Description

Grothendieck logic (flattening of logic graph to a single logic)

The Grothendieck logic is defined to be the heterogeneous logic over the logic graph. This will be the logic over which the data structures and algorithms for specification in-the-large are built.

This module heavily works with existential types, see http://haskell.org/hawiki/ExistentialTypes and chapter 7 of /Heterogeneous specification and the heterogeneous tool set/ (http://www.informatik.uni-bremen.de/~till/papers/habil.ps).

References:

R. Diaconescu: Grothendieck institutions J. applied categorical structures 10, 2002, p. 383-402.

T. Mossakowski: Comorphism-based Grothendieck institutions. In K. Diks, W. Rytter (Eds.), Mathematical foundations of computer science, LNCS 2420, pp. 593-604

T. Mossakowski: Heterogeneous specification and the heterogeneous tool set.

Synopsis

Documentation

data G_basic_spec

Grothendieck basic specifications

Constructors

forall lid sublogics basic_spec sentence symb_items symb_map_items sign morphism symbol raw_symbol proof_tree . Logic lid sublogics basic_spec sentence symb_items symb_map_items sign morphism symbol raw_symbol proof_tree => G_basic_spec lid basic_spec 

data G_sign

Grothendieck signatures with an lookup index. Zero indices indicate unknown ones. It would be nice to have special (may be negative) indices for empty signatures (one for every logic).

Constructors

forall lid sublogics basic_spec sentence symb_items symb_map_items sign morphism symbol raw_symbol proof_tree . Logic lid sublogics basic_spec sentence symb_items symb_map_items sign morphism symbol raw_symbol proof_tree => G_sign 

Fields

gSignLogic :: lid
 
gSign :: ExtSign sign symbol
 
gSignSelfIdx :: SigId

index to lookup this G_sign in sign map

newtype SigId

index for signatures

Constructors

SigId Int 

isHomSubGsign :: G_sign -> G_sign -> Bool

prefer a faster subsignature test if possible

data G_symbolmap a

Grothendieck maps with symbol as keys

Constructors

forall lid sublogics basic_spec sentence symb_items symb_map_items sign morphism symbol raw_symbol proof_tree . Logic lid sublogics basic_spec sentence symb_items symb_map_items sign morphism symbol raw_symbol proof_tree => G_symbolmap lid (Map symbol a) 

Instances

(Typeable * a, Ord a) => Eq (G_symbolmap a) 
(Typeable * a, Ord a) => Ord (G_symbolmap a) 
Show a => Show (G_symbolmap a) 
(Ord a, ShATermLG a) => ShATermLG (G_symbolmap a) 
Typeable (* -> *) G_symbolmap 

data G_mapofsymbol a

Grothendieck maps with symbol as values

Constructors

forall lid sublogics basic_spec sentence symb_items symb_map_items sign morphism symbol raw_symbol proof_tree . Logic lid sublogics basic_spec sentence symb_items symb_map_items sign morphism symbol raw_symbol proof_tree => G_mapofsymbol lid (Map a symbol) 

Instances

(Typeable * a, Ord a) => Eq (G_mapofsymbol a) 
(Typeable * a, Ord a) => Ord (G_mapofsymbol a) 
Show a => Show (G_mapofsymbol a) 
(Ord a, ShATermLG a) => ShATermLG (G_mapofsymbol a) 
Typeable (* -> *) G_mapofsymbol 

data G_symbol

Grothendieck symbols

Constructors

forall lid sublogics basic_spec sentence symb_items symb_map_items sign morphism symbol raw_symbol proof_tree . Logic lid sublogics basic_spec sentence symb_items symb_map_items sign morphism symbol raw_symbol proof_tree => G_symbol lid symbol 

data G_symb_items_list

Grothendieck symbol lists

Constructors

forall lid sublogics basic_spec sentence symb_items symb_map_items sign morphism symbol raw_symbol proof_tree . Logic lid sublogics basic_spec sentence symb_items symb_map_items sign morphism symbol raw_symbol proof_tree => G_symb_items_list lid [symb_items] 

data G_symb_map_items_list

Grothendieck symbol maps

Constructors

forall lid sublogics basic_spec sentence symb_items symb_map_items sign morphism symbol raw_symbol proof_tree . Logic lid sublogics basic_spec sentence symb_items symb_map_items sign morphism symbol raw_symbol proof_tree => G_symb_map_items_list lid [symb_map_items] 

data G_sublogics

Grothendieck sublogics

Constructors

forall lid sublogics basic_spec sentence symb_items symb_map_items sign morphism symbol raw_symbol proof_tree . Logic lid sublogics basic_spec sentence symb_items symb_map_items sign morphism symbol raw_symbol proof_tree => G_sublogics lid sublogics 

data G_morphism

Homogeneous Grothendieck signature morphisms with indices. For the domain index it would be nice it showed also the emptiness.

Constructors

forall lid sublogics basic_spec sentence symb_items symb_map_items sign morphism symbol raw_symbol proof_tree . Logic lid sublogics basic_spec sentence symb_items symb_map_items sign morphism symbol raw_symbol proof_tree => G_morphism 

Fields

gMorphismLogic :: lid
 
gMorphism :: morphism
 
gMorphismSelfIdx :: MorId

lookup index in morphism map

newtype MorId

index for morphisms

Constructors

MorId Int 

mkG_morphism :: forall lid sublogics basic_spec sentence symb_items symb_map_items sign morphism symbol raw_symbol proof_tree. Logic lid sublogics basic_spec sentence symb_items symb_map_items sign morphism symbol raw_symbol proof_tree => lid -> morphism -> G_morphism

lessSublogicComor :: G_sublogics -> AnyComorphism -> Bool

check if sublogic fits for comorphism

lookupLogic :: Monad m => String -> String -> LogicGraph -> m AnyLogic

find a logic in a logic graph

lookupCompComorphism :: Monad m => [String] -> LogicGraph -> m AnyComorphism

find a comorphism composition in a logic graph

lookupComorphism :: Monad m => String -> LogicGraph -> m AnyComorphism

find a comorphism in a logic graph

lookupModification :: Monad m => String -> LogicGraph -> m AnyModification

find a modification in a logic graph

data GMorphism

Grothendieck signature morphisms with indices

Constructors

forall cid lid1 sublogics1 basic_spec1 sentence1 symb_items1 symb_map_items1 sign1 morphism1 symbol1 raw_symbol1 proof_tree1 lid2 sublogics2 basic_spec2 sentence2 symb_items2 symb_map_items2 sign2 morphism2 symbol2 raw_symbol2 proof_tree2 . Comorphism cid lid1 sublogics1 basic_spec1 sentence1 symb_items1 symb_map_items1 sign1 morphism1 symbol1 raw_symbol1 proof_tree1 lid2 sublogics2 basic_spec2 sentence2 symb_items2 symb_map_items2 sign2 morphism2 symbol2 raw_symbol2 proof_tree2 => GMorphism 

Fields

gMorphismComor :: cid
 
gMorphismSign :: ExtSign sign1 symbol1
 
gMorphismSignIdx :: SigId

G_sign index of source signature

gMorphismMor :: morphism2
 
gMorphismMorIdx :: MorId

`G_morphism index of target morphism

gEmbed :: G_morphism -> GMorphism

Embedding of homogeneous signature morphisms as Grothendieck sig mors

gEmbed2 :: G_sign -> G_morphism -> GMorphism

Embedding of homogeneous signature morphisms as Grothendieck sig mors

gEmbedComorphism :: AnyComorphism -> G_sign -> Result GMorphism

Embedding of comorphisms as Grothendieck sig mors

gsigUnion :: LogicGraph -> Bool -> G_sign -> G_sign -> Result G_sign

heterogeneous union of two Grothendieck signatures

gsigManyUnion :: LogicGraph -> [G_sign] -> Result G_sign

union of a list of Grothendieck signatures

homogeneousMorManyUnion :: [G_morphism] -> Result G_morphism

homogeneous Union of a list of morphisms

logicInclusion :: LogicGraph -> AnyLogic -> AnyLogic -> Result AnyComorphism

inclusion between two logics

ginclusion :: LogicGraph -> G_sign -> G_sign -> Result GMorphism

inclusion morphism between two Grothendieck signatures

compInclusion :: LogicGraph -> GMorphism -> GMorphism -> Result GMorphism

Composition of two Grothendieck signature morphisms with intermediate inclusion

findComorphismPaths :: LogicGraph -> G_sublogics -> [AnyComorphism]

Find all (composites of) comorphisms starting from a given logic

logicGraph2Graph :: LogicGraph -> Graph (G_sublogics, Maybe AnyComorphism) AnyComorphism

graph representation of the logic graph

findComorphism :: Monad m => G_sublogics -> [AnyComorphism] -> m AnyComorphism

finds first comorphism with a matching sublogic

isTransportable :: GMorphism -> Bool

check transportability of Grothendieck signature morphisms (currently returns false for heterogeneous morphisms)