Copyright | (c) Till Mossakowski Uni Bremen 2002-2006 |
---|---|
License | GPLv2 or higher, see LICENSE.txt |
Maintainer | till@informatik.uni-bremen.de |
Stability | provisional |
Portability | non-portable(Logic) |
Safe Haskell | None |
- types for structured specification analysis
- methods to check the type of an edge
- utility functions
- for node signatures
- accessing node label
- creating node content and label
- handle the lock of a node
- edge label equalities
- setting index maps
- looking up in index maps
- getting index maps and their maximal index
- lookup other graph parts
- lookup nodes by their names or other properties
- accessing the actual graph
- manipulate graph
- top-level functions
- test link types
- create link types
- link conservativity
- bottom up traversal
Central datastructures for development graphs Follows Sect. IV:4.2 of the CASL Reference Manual.
We also provide functions for constructing and modifying development graphs. However note that these changes need to be propagated to the GUI if they also shall be visible in the displayed development graph.
Synopsis
- data NodeSig = NodeSig {}
- data MaybeNode
- getMaybeNodes :: MaybeNode -> Set Node
- newtype Renamed = Renamed RENAMING
- data MaybeRestricted
- data DGOrigin
- = DGEmpty
- | DGBasic
- | DGBasicSpec (Maybe G_basic_spec) G_sign (Set G_symbol)
- | DGExtension
- | DGLogicCoercion
- | DGTranslation Renamed
- | DGUnion
- | DGIntersect
- | DGExtract
- | DGRestriction MaybeRestricted (Set G_symbol)
- | DGRevealTranslation
- | DGFreeOrCofree FreeOrCofree
- | DGLocal
- | DGClosed
- | DGLogicQual
- | DGData
- | DGFormalParams
- | DGVerificationGeneric
- | DGImports
- | DGInst IRI
- | DGFitSpec
- | DGFitView IRI
- | DGProof
- | DGNormalForm Node
- | DGintegratedSCC
- | DGFlattening
- | DGAlignment
- | DGTest
- data DGNodeInfo
- = DGNode { }
- | DGRef {
- ref_libname :: LibName
- ref_node :: Node
- data DGNodeLab = DGNodeLab {
- dgn_name :: NodeName
- dgn_theory :: G_theory
- globalTheory :: Maybe G_theory
- labelHasHiding :: Bool
- labelHasFree :: Bool
- dgn_nf :: Maybe Node
- dgn_sigma :: Maybe GMorphism
- dgn_freenf :: Maybe Node
- dgn_phi :: Maybe GMorphism
- nodeInfo :: DGNodeInfo
- nodeMod :: NodeMod
- xnode :: Maybe XNode
- dgn_lock :: Maybe (MVar ())
- isDGRef :: DGNodeLab -> Bool
- sensWithKind :: (forall a. SenStatus a (AnyComorphism, BasicProof) -> Bool) -> G_theory -> [String]
- hasSenKind :: (forall a. SenStatus a (AnyComorphism, BasicProof) -> Bool) -> DGNodeLab -> Bool
- hasOpenGoals :: DGNodeLab -> Bool
- isInternalNode :: DGNodeLab -> Bool
- getNodeConsStatus :: DGNodeLab -> ConsStatus
- getNodeCons :: DGNodeLab -> Conservativity
- getNodeConservativity :: LNode DGNodeLab -> Conservativity
- hasOpenNodeConsStatus :: Bool -> DGNodeLab -> Bool
- markNodeConsistency :: Conservativity -> String -> DGNodeLab -> DGNodeLab
- markNodeConsistent :: String -> DGNodeLab -> DGNodeLab
- markNodeInconsistent :: String -> DGNodeLab -> DGNodeLab
- getRealDGNodeType :: DGNodeLab -> DGNodeType
- newtype Fitted = Fitted [G_mapping]
- data DGLinkOrigin
- = SeeTarget
- | SeeSource
- | TEST
- | DGLinkVerif
- | DGImpliesLink
- | DGLinkExtension
- | DGLinkTranslation
- | DGLinkClosedLenv
- | DGLinkImports
- | DGLinkIntersect
- | DGLinkMorph IRI
- | DGLinkInst IRI Fitted
- | DGLinkInstArg IRI
- | DGLinkView IRI Fitted
- | DGLinkAlign IRI
- | DGLinkFitView IRI
- | DGLinkFitViewImp IRI
- | DGLinkProof
- | DGLinkFlatteningUnion
- | DGLinkFlatteningRename
- | DGLinkRefinement IRI
- data DGLinkType
- thmLinkStatus :: DGLinkType -> Maybe ThmLinkStatus
- thmProofBasis :: DGLinkType -> ProofBasis
- updThmProofBasis :: DGLinkType -> ProofBasis -> DGLinkType
- data DGLinkLab = DGLink {
- dgl_morphism :: GMorphism
- dgl_type :: DGLinkType
- dgl_origin :: DGLinkOrigin
- dglPending :: Bool
- dgl_id :: EdgeId
- dglName :: String
- mkDGLink :: GMorphism -> DGLinkType -> DGLinkOrigin -> String -> EdgeId -> DGLinkLab
- nameDGLink :: String -> DGLinkLab -> DGLinkLab
- defDGLink :: GMorphism -> DGLinkType -> DGLinkOrigin -> DGLinkLab
- defDGLinkId :: GMorphism -> DGLinkType -> DGLinkOrigin -> EdgeId -> DGLinkLab
- globDefLink :: GMorphism -> DGLinkOrigin -> DGLinkLab
- getDGLinkType :: DGLinkLab -> String
- getHomEdgeType :: Bool -> Bool -> DGLinkType -> DGEdgeTypeModInc
- getRealDGLinkType :: DGLinkLab -> DGEdgeType
- getProofBasis :: DGLinkLab -> ProofBasis
- setProof :: ThmLinkStatus -> DGLinkType -> DGLinkType
- isProven :: DGLinkType -> Bool
- isGlobalEdge :: DGLinkType -> Bool
- isGlobalThm :: DGLinkType -> Bool
- isUnprovenGlobalThm :: DGLinkType -> Bool
- isLocalThm :: DGLinkType -> Bool
- isUnprovenLocalThm :: DGLinkType -> Bool
- isUnprovenHidingThm :: DGLinkType -> Bool
- isFreeEdge :: DGLinkType -> Bool
- isCofreeEdge :: DGLinkType -> Bool
- hasOutgoingFreeEdge :: DGraph -> Node -> Bool
- data GenSig = GenSig MaybeNode [NodeSig] MaybeNode
- getGenSigNodes :: GenSig -> Set Node
- data ExtGenSig = ExtGenSig {}
- getExtGenSigNodes :: ExtGenSig -> Set Node
- data ExtViewSig = ExtViewSig NodeSig GMorphism ExtGenSig
- getExtViewSigNodes :: ExtViewSig -> Set Node
- data UnitSig = UnitSig [NodeSig] NodeSig (Maybe NodeSig)
- getUnitSigNodes :: UnitSig -> Set Node
- data ImpUnitSigOrSig
- type StUnitCtx = Map IRI ImpUnitSigOrSig
- emptyStUnitCtx :: StUnitCtx
- type RefSigMap = Map IRI RefSig
- getSigMapNodes :: RefSigMap -> Set Node
- type BStContext = Map IRI RefSig
- getBStContextNodes :: BStContext -> Set Node
- data RefSig
- = BranchRefSig RTPointer (UnitSig, Maybe BranchSig)
- | ComponentRefSig RTPointer RefSigMap
- getRefSigNodes :: RefSig -> Set Node
- getPointerFromRef :: RefSig -> RTPointer
- setPointerInRef :: RefSig -> RTPointer -> RefSig
- setUnitSigInRef :: RefSig -> UnitSig -> RefSig
- getUnitSigFromRef :: RefSig -> Result UnitSig
- mkRefSigFromUnit :: UnitSig -> RefSig
- mkBotSigFromUnit :: UnitSig -> RefSig
- data BranchSig
- getBranchSigNodes :: BranchSig -> Set Node
- type RefStUnitCtx = Map IRI RefSig
- emptyRefStUnitCtx :: RefStUnitCtx
- matchesContext :: RefSigMap -> BStContext -> Bool
- equalSigs :: UnitSig -> UnitSig -> Bool
- namesMatchCtx :: [IRI] -> BStContext -> RefSigMap -> Bool
- modifyCtx :: [IRI] -> RefSigMap -> BStContext -> BStContext
- refSigComposition :: RefSig -> RefSig -> Result RefSig
- data GlobalEntry
- getGlobEntryNodes :: GlobalEntry -> Set Node
- data AlignSig
- type GlobalEnv = Map IRI GlobalEntry
- getGlobNodes :: GlobalEnv -> Set Node
- data DGChange
- = InsertNode (LNode DGNodeLab)
- | DeleteNode (LNode DGNodeLab)
- | InsertEdge (LEdge DGLinkLab)
- | DeleteEdge (LEdge DGLinkLab)
- | SetNodeLab DGNodeLab (LNode DGNodeLab)
- data HistElem
- type ProofHistory = SizedList HistElem
- data RTNodeType
- data RTNodeLab = RTNodeLab {
- rtn_type :: RTNodeType
- rtn_name :: String
- rtn_diag :: String
- data RTLinkType
- data RTLinkLab = RTLink {}
- addNodeRT :: DGraph -> UnitSig -> String -> (Node, DGraph)
- addSpecNodeRT :: DGraph -> UnitSig -> String -> (Node, DGraph)
- updateNodeNameRT :: DGraph -> Node -> Bool -> String -> DGraph
- updateSigRT :: DGraph -> Node -> UnitSig -> DGraph
- updateNodeNameSpecRT :: DGraph -> Node -> String -> DGraph
- addSubTree :: DGraph -> Maybe RTLeaves -> RTPointer -> (DGraph, RTPointer)
- copySubTree :: DGraph -> Node -> Maybe Node -> (DGraph, Map Node Node)
- copySubTreeN :: DGraph -> [Node] -> Map Node Node -> (DGraph, Map Node Node)
- copyNode :: Node -> (DGraph, Map Node Node) -> LNode RTLinkLab -> (DGraph, Map Node Node)
- addRefEdgeRT :: DGraph -> Node -> Node -> DGraph
- addEdgesToNodeRT :: DGraph -> [Node] -> Node -> DGraph
- data DiagNodeLab = DiagNode {}
- data DiagLinkLab = DiagLink {
- dl_morphism :: GMorphism
- dl_number :: Int
- data Diag = Diagram {
- diagGraph :: Gr DiagNodeLab DiagLinkLab
- numberOfEdges :: Int
- data DGraph = DGraph {
- globalAnnos :: GlobalAnnos
- optLibDefn :: Maybe LIB_DEFN
- globalEnv :: GlobalEnv
- dgBody :: Gr DGNodeLab DGLinkLab
- currentBaseTheory :: Maybe NodeSig
- refTree :: Gr RTNodeLab RTLinkLab
- specRoots :: Map String [Node]
- nameMap :: MapSet String Node
- archSpecDiags :: Map String Diag
- getNewEdgeId :: EdgeId
- allRefNodes :: Map (LibName, Node) Node
- sigMap :: Map SigId G_sign
- thMap :: Map ThId G_theory
- morMap :: Map MorId G_morphism
- proofHistory :: ProofHistory
- redoHistory :: ProofHistory
- emptyDG :: DGraph
- type LibEnv = Map LibName DGraph
- emptyLibEnv :: LibEnv
- emptyG_sign :: AnyLogic -> G_sign
- getMaybeSig :: MaybeNode -> G_sign
- getLogic :: MaybeNode -> AnyLogic
- getNodeLogic :: NodeSig -> AnyLogic
- dgn_origin :: DGNodeLab -> DGOrigin
- dgn_libname :: DGNodeLab -> LibName
- dgn_node :: DGNodeLab -> Node
- dgn_sign :: DGNodeLab -> G_sign
- getDGNodeName :: DGNodeLab -> String
- globOrLocTh :: DGNodeLab -> G_theory
- newConsNodeInfo :: DGOrigin -> Conservativity -> DGNodeInfo
- newNodeInfo :: DGOrigin -> DGNodeInfo
- newRefInfo :: LibName -> Node -> DGNodeInfo
- newInfoNodeLab :: NodeName -> DGNodeInfo -> G_theory -> DGNodeLab
- newNodeLab :: NodeName -> DGOrigin -> G_theory -> DGNodeLab
- treatNodeLock :: (MVar () -> a) -> DGNodeLab -> a
- tryLockLocal :: DGNodeLab -> IO Bool
- unlockLocal :: DGNodeLab -> IO ()
- hasLock :: DGNodeLab -> Bool
- eqDGLinkLabContent :: DGLinkLab -> DGLinkLab -> Bool
- eqDGLinkLabById :: DGLinkLab -> DGLinkLab -> Bool
- cpIndexMaps :: DGraph -> DGraph -> DGraph
- setSigMapDG :: Map SigId G_sign -> DGraph -> DGraph
- setThMapDG :: Map ThId G_theory -> DGraph -> DGraph
- setMorMapDG :: Map MorId G_morphism -> DGraph -> DGraph
- lookupSigMapDG :: SigId -> DGraph -> Maybe G_sign
- lookupThMapDG :: ThId -> DGraph -> Maybe G_theory
- lookupMorMapDG :: MorId -> DGraph -> Maybe G_morphism
- sigMapI :: DGraph -> (Map SigId G_sign, SigId)
- thMapI :: DGraph -> (Map ThId G_theory, ThId)
- morMapI :: DGraph -> (Map MorId G_morphism, MorId)
- lookupGlobalEnvDG :: IRI -> DGraph -> Maybe GlobalEntry
- lookupInAllRefNodesDG :: DGNodeInfo -> DGraph -> Maybe Node
- lookupNodeByName :: String -> DGraph -> [LNode DGNodeLab]
- lookupUniqueNodeByName :: String -> DGraph -> Maybe (LNode DGNodeLab)
- filterLocalNodesByName :: String -> DGraph -> [LNode DGNodeLab]
- filterRefNodesByName :: String -> LibName -> DGraph -> [LNode DGNodeLab]
- lookupLocalNodeByNameInEnv :: LibEnv -> String -> Maybe (DGraph, LNode DGNodeLab)
- lookupLocalNodeByName :: LibEnv -> DGraph -> String -> Maybe (DGraph, LNode DGNodeLab)
- lookupLocalNode :: LibEnv -> DGraph -> Node -> (DGraph, LNode DGNodeLab)
- lookupRefNode :: LibEnv -> LibName -> DGraph -> Node -> (LibName, DGraph, LNode DGNodeLab)
- lookupRefNodeM :: LibEnv -> Maybe LibName -> DGraph -> Node -> (Maybe LibName, DGraph, LNode DGNodeLab)
- getNewNodeDG :: DGraph -> Node
- labNodesDG :: DGraph -> [LNode DGNodeLab]
- labEdgesDG :: DGraph -> [LEdge DGLinkLab]
- isEmptyDG :: DGraph -> Bool
- gelemDG :: Node -> DGraph -> Bool
- innDG :: DGraph -> Node -> [LEdge DGLinkLab]
- outDG :: DGraph -> Node -> [LEdge DGLinkLab]
- nodesDG :: DGraph -> [Node]
- labDG :: DGraph -> Node -> DGNodeLab
- labRT :: DGraph -> Node -> RTNodeLab
- getNameOfNode :: Node -> DGraph -> String
- newNodesDG :: Int -> DGraph -> [Node]
- safeContextDG :: String -> DGraph -> Node -> Context DGNodeLab DGLinkLab
- labelNodeDG :: LNode DGNodeLab -> DGraph -> (DGraph, DGNodeLab)
- delNodeDG :: Node -> DGraph -> DGraph
- delNodesDG :: [Node] -> DGraph -> DGraph
- insNodeDG :: LNode DGNodeLab -> DGraph -> DGraph
- insLNodeDG :: LNode DGNodeLab -> DGraph -> DGraph
- insNodesDG :: [LNode DGNodeLab] -> DGraph -> DGraph
- delLEdgeDG :: LEdge DGLinkLab -> DGraph -> DGraph
- insInclEdgeDG :: LogicGraph -> DGraph -> NodeSig -> NodeSig -> Result DGraph
- insLEdgeDG :: LEdge DGLinkLab -> DGraph -> (LEdge DGLinkLab, DGraph)
- compareLinks :: DGLinkLab -> DGLinkLab -> Ordering
- insLEdgeNubDG :: LEdge DGLinkLab -> DGraph -> DGraph
- insEdgeAsIs :: LEdge DGLinkLab -> DGraph -> DGraph
- insEdgesDG :: [LEdge DGLinkLab] -> DGraph -> DGraph
- mkGraphDG :: [LNode DGNodeLab] -> [LEdge DGLinkLab] -> DGraph -> DGraph
- getDGLinksById :: EdgeId -> DGraph -> [LEdge DGLinkLab]
- lookupUniqueLink :: MonadFail m => Node -> EdgeId -> DGraph -> m (LEdge DGLinkLab)
- initLocking :: DGraph -> LNode DGNodeLab -> IO (DGraph, DGNodeLab)
- lookupDGraph :: LibName -> LibEnv -> DGraph
- computeLocalTheory :: Monad m => LibEnv -> LibName -> Node -> m G_theory
- computeLocalNodeTheory :: Monad m => LibEnv -> DGraph -> Node -> m G_theory
- computeLocalLabelTheory :: Monad m => LibEnv -> DGNodeLab -> m G_theory
- liftE :: (DGLinkType -> a) -> LEdge DGLinkLab -> a
- isGlobalDef :: DGLinkType -> Bool
- isLocalDef :: DGLinkType -> Bool
- isHidingDef :: DGLinkType -> Bool
- isDefEdge :: DGLinkType -> Bool
- isLocalEdge :: DGLinkType -> Bool
- isHidingEdge :: DGLinkType -> Bool
- hidingThm :: Node -> GMorphism -> DGLinkType
- globalThm :: DGLinkType
- localThm :: DGLinkType
- globalConsThm :: Conservativity -> DGLinkType
- localConsThm :: Conservativity -> DGLinkType
- localOrGlobalThm :: Scope -> Conservativity -> DGLinkType
- localOrGlobalDef :: Scope -> Conservativity -> DGLinkType
- globalConsDef :: Conservativity -> DGLinkType
- globalDef :: DGLinkType
- localDef :: DGLinkType
- getLinkConsStatus :: DGLinkType -> ConsStatus
- getEdgeConsStatus :: DGLinkLab -> ConsStatus
- getCons :: DGLinkType -> Conservativity
- getConservativity :: LEdge DGLinkLab -> Conservativity
- getConservativityOfPath :: [LEdge DGLinkLab] -> Conservativity
- getLibDepRel :: LibEnv -> Rel LibName
- getTopsortedLibs :: LibEnv -> [LibName]
- dependentLibs :: LibName -> LibEnv -> [LibName]
- topsortedNodes :: DGraph -> [LNode DGNodeLab]
- changedPendingEdges :: DGraph -> [LEdge DGLinkLab]
- changedLocalTheorems :: DGraph -> LNode DGNodeLab -> [LEdge DGLinkLab]
- duplicateDefEdges :: DGraph -> [Edge]
- ensureUniqueNames :: DGraph -> IRI -> Int -> NodeName
types for structured specification analysis
basic types
Node with signature in a DG
NodeSig or possibly the empty sig in a logic (but since we want to avoid lots of vsacuous nodes with empty sig, we do not assign a real node in the DG here)
Instances
Eq MaybeNode Source # | |
Show MaybeNode Source # | |
ShATermLG MaybeNode Source # | |
Defined in ATC.DevGraph toShATermLG :: ATermTable -> MaybeNode -> IO (ATermTable, Int) Source # fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, MaybeNode) Source # |
getMaybeNodes :: MaybeNode -> Set Node Source #
a wrapper for renamings with a trivial Ord instance
data MaybeRestricted Source #
a wrapper for restrictions with a trivial Ord instance
Instances
Eq MaybeRestricted Source # | |
Defined in Static.DevGraph (==) :: MaybeRestricted -> MaybeRestricted -> Bool (/=) :: MaybeRestricted -> MaybeRestricted -> Bool | |
Ord MaybeRestricted Source # | |
Defined in Static.DevGraph compare :: MaybeRestricted -> MaybeRestricted -> Ordering (<) :: MaybeRestricted -> MaybeRestricted -> Bool (<=) :: MaybeRestricted -> MaybeRestricted -> Bool (>) :: MaybeRestricted -> MaybeRestricted -> Bool (>=) :: MaybeRestricted -> MaybeRestricted -> Bool max :: MaybeRestricted -> MaybeRestricted -> MaybeRestricted min :: MaybeRestricted -> MaybeRestricted -> MaybeRestricted | |
Show MaybeRestricted Source # | |
Defined in Static.DevGraph showsPrec :: Int -> MaybeRestricted -> ShowS show :: MaybeRestricted -> String showList :: [MaybeRestricted] -> ShowS | |
ShATermLG MaybeRestricted Source # | |
Defined in ATC.DevGraph toShATermLG :: ATermTable -> MaybeRestricted -> IO (ATermTable, Int) Source # fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, MaybeRestricted) Source # |
Data type indicating the origin of nodes and edges in the input language This is not used in the DG calculus, only may be used in the future for reconstruction of input and management of change.
Instances
data DGNodeInfo Source #
node content or reference to another library's node
DGNode | |
DGRef | |
|
Instances
Eq DGNodeInfo Source # | |
Defined in Static.DevGraph (==) :: DGNodeInfo -> DGNodeInfo -> Bool (/=) :: DGNodeInfo -> DGNodeInfo -> Bool | |
Show DGNodeInfo Source # | |
Defined in Static.DevGraph showsPrec :: Int -> DGNodeInfo -> ShowS show :: DGNodeInfo -> String showList :: [DGNodeInfo] -> ShowS | |
Pretty DGNodeInfo Source # | |
Defined in Static.PrintDevGraph pretty :: DGNodeInfo -> Doc Source # pretties :: [DGNodeInfo] -> Doc Source # | |
ShATermLG DGNodeInfo Source # | |
Defined in ATC.DevGraph toShATermLG :: ATermTable -> DGNodeInfo -> IO (ATermTable, Int) Source # fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, DGNodeInfo) Source # |
node inscriptions in development graphs. Nothing entries indicate "not computed yet"
DGNodeLab | |
|
sensWithKind :: (forall a. SenStatus a (AnyComorphism, BasicProof) -> Bool) -> G_theory -> [String] Source #
hasSenKind :: (forall a. SenStatus a (AnyComorphism, BasicProof) -> Bool) -> DGNodeLab -> Bool Source #
hasOpenGoals :: DGNodeLab -> Bool Source #
test if a given node label has local open goals
isInternalNode :: DGNodeLab -> Bool Source #
check if the node has an internal name
getNodeConservativity :: LNode DGNodeLab -> Conservativity Source #
returns the Conservativity if the given node has one, otherwise none
hasOpenNodeConsStatus :: Bool -> DGNodeLab -> Bool Source #
test if a node conservativity is open, return input for refs or nodes with normal forms
markNodeConsistency :: Conservativity -> String -> DGNodeLab -> DGNodeLab Source #
markNodeConsistent :: String -> DGNodeLab -> DGNodeLab Source #
markNodeInconsistent :: String -> DGNodeLab -> DGNodeLab Source #
getRealDGNodeType :: DGNodeLab -> DGNodeType Source #
creates a DGNodeType from a DGNodeLab
a wrapper for fitting morphisms with a trivial Eq instance
Instances
Eq Fitted Source # | |
Show Fitted Source # | |
ShATermLG Fitted Source # | |
Defined in ATC.DevGraph toShATermLG :: ATermTable -> Fitted -> IO (ATermTable, Int) Source # fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, Fitted) Source # |
data DGLinkOrigin Source #
Instances
Eq DGLinkOrigin Source # | |
Defined in Static.DevGraph (==) :: DGLinkOrigin -> DGLinkOrigin -> Bool (/=) :: DGLinkOrigin -> DGLinkOrigin -> Bool | |
Show DGLinkOrigin Source # | |
Defined in Static.DevGraph showsPrec :: Int -> DGLinkOrigin -> ShowS show :: DGLinkOrigin -> String showList :: [DGLinkOrigin] -> ShowS | |
Pretty DGLinkOrigin Source # | |
Defined in Static.PrintDevGraph pretty :: DGLinkOrigin -> Doc Source # pretties :: [DGLinkOrigin] -> Doc Source # | |
ShATermLG DGLinkOrigin Source # | |
Defined in ATC.DevGraph toShATermLG :: ATermTable -> DGLinkOrigin -> IO (ATermTable, Int) Source # fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, DGLinkOrigin) Source # |
data DGLinkType Source #
Link types of development graphs, Sect. IV:4.2 of the CASL Reference Manual explains them in depth.
ScopedLink Scope LinkKind ConsStatus | |
HidingDefLink | |
FreeOrCofreeDefLink FreeOrCofree MaybeNode | |
HidingFreeOrCofreeThm (Maybe FreeOrCofree) Node GMorphism ThmLinkStatus |
Instances
Eq DGLinkType Source # | |
Defined in Static.DevGraph (==) :: DGLinkType -> DGLinkType -> Bool (/=) :: DGLinkType -> DGLinkType -> Bool | |
Show DGLinkType Source # | |
Defined in Static.DevGraph showsPrec :: Int -> DGLinkType -> ShowS show :: DGLinkType -> String showList :: [DGLinkType] -> ShowS | |
Pretty DGLinkType Source # | |
Defined in Static.PrintDevGraph pretty :: DGLinkType -> Doc Source # pretties :: [DGLinkType] -> Doc Source # | |
ShATermLG DGLinkType Source # | |
Defined in ATC.DevGraph toShATermLG :: ATermTable -> DGLinkType -> IO (ATermTable, Int) Source # fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, DGLinkType) Source # |
thmLinkStatus :: DGLinkType -> Maybe ThmLinkStatus Source #
extract theorem link status from link type
thmProofBasis :: DGLinkType -> ProofBasis Source #
extract proof basis from link type
updThmProofBasis :: DGLinkType -> ProofBasis -> DGLinkType Source #
link inscriptions in development graphs
DGLink | |
|
Instances
Eq DGLinkLab Source # | |
Show DGLinkLab Source # | |
Pretty DGLinkLab Source # | |
ShATermLG DGLinkLab Source # | |
Defined in ATC.DevGraph toShATermLG :: ATermTable -> DGLinkLab -> IO (ATermTable, Int) Source # fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, DGLinkLab) Source # | |
Eq (DaVinciArc EdgeValue) | |
Eq (DaVinciArc EdgeValue) | |
mkDGLink :: GMorphism -> DGLinkType -> DGLinkOrigin -> String -> EdgeId -> DGLinkLab Source #
nameDGLink :: String -> DGLinkLab -> DGLinkLab Source #
name a link
defDGLink :: GMorphism -> DGLinkType -> DGLinkOrigin -> DGLinkLab Source #
defDGLinkId :: GMorphism -> DGLinkType -> DGLinkOrigin -> EdgeId -> DGLinkLab Source #
globDefLink :: GMorphism -> DGLinkOrigin -> DGLinkLab Source #
getDGLinkType :: DGLinkLab -> String Source #
describe the link type of the label
getHomEdgeType :: Bool -> Bool -> DGLinkType -> DGEdgeTypeModInc Source #
getRealDGLinkType :: DGLinkLab -> DGEdgeType Source #
creates a DGEdgeType from a DGLinkLab
getProofBasis :: DGLinkLab -> ProofBasis Source #
return the proof basis of the given linklab
setProof :: ThmLinkStatus -> DGLinkType -> DGLinkType Source #
set proof for theorem links
methods to check the type of an edge
isProven :: DGLinkType -> Bool Source #
isGlobalEdge :: DGLinkType -> Bool Source #
isGlobalThm :: DGLinkType -> Bool Source #
isUnprovenGlobalThm :: DGLinkType -> Bool Source #
isLocalThm :: DGLinkType -> Bool Source #
isUnprovenLocalThm :: DGLinkType -> Bool Source #
isUnprovenHidingThm :: DGLinkType -> Bool Source #
isFreeEdge :: DGLinkType -> Bool Source #
isCofreeEdge :: DGLinkType -> Bool Source #
hasOutgoingFreeEdge :: DGraph -> Node -> Bool Source #
types for global environments
import, formal parameters and united signature of formal params
Instances
Show GenSig Source # | |
ShATermLG GenSig Source # | |
Defined in ATC.DevGraph toShATermLG :: ATermTable -> GenSig -> IO (ATermTable, Int) Source # fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, GenSig) Source # |
getGenSigNodes :: GenSig -> Set Node Source #
genericity and body
getExtGenSigNodes :: ExtGenSig -> Set Node Source #
data ExtViewSig Source #
source, morphism, parameterized target
Instances
Show ExtViewSig Source # | |
Defined in Static.DevGraph showsPrec :: Int -> ExtViewSig -> ShowS show :: ExtViewSig -> String showList :: [ExtViewSig] -> ShowS | |
Pretty ExtViewSig Source # | |
Defined in Static.PrintDevGraph pretty :: ExtViewSig -> Doc Source # pretties :: [ExtViewSig] -> Doc Source # | |
ShATermLG ExtViewSig Source # | |
Defined in ATC.DevGraph toShATermLG :: ATermTable -> ExtViewSig -> IO (ATermTable, Int) Source # fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, ExtViewSig) Source # |
getExtViewSigNodes :: ExtViewSig -> Set Node Source #
types for architectural and unit specification analysis (as defined for basic static semantics in Chap. III:5.1)
getUnitSigNodes :: UnitSig -> Set Node Source #
data ImpUnitSigOrSig Source #
Instances
Eq ImpUnitSigOrSig Source # | |
Defined in Static.DevGraph (==) :: ImpUnitSigOrSig -> ImpUnitSigOrSig -> Bool (/=) :: ImpUnitSigOrSig -> ImpUnitSigOrSig -> Bool | |
Show ImpUnitSigOrSig Source # | |
Defined in Static.DevGraph showsPrec :: Int -> ImpUnitSigOrSig -> ShowS show :: ImpUnitSigOrSig -> String showList :: [ImpUnitSigOrSig] -> ShowS | |
Pretty ImpUnitSigOrSig Source # | |
Defined in Static.PrintDevGraph pretty :: ImpUnitSigOrSig -> Doc Source # pretties :: [ImpUnitSigOrSig] -> Doc Source # | |
ShATermLG ImpUnitSigOrSig Source # | |
Defined in ATC.DevGraph toShATermLG :: ATermTable -> ImpUnitSigOrSig -> IO (ATermTable, Int) Source # fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, ImpUnitSigOrSig) Source # |
type StUnitCtx = Map IRI ImpUnitSigOrSig Source #
getSigMapNodes :: RefSigMap -> Set Node Source #
type BStContext = Map IRI RefSig Source #
getBStContextNodes :: BStContext -> Set Node Source #
getRefSigNodes :: RefSig -> Set Node Source #
getPointerFromRef :: RefSig -> RTPointer Source #
mkRefSigFromUnit :: UnitSig -> RefSig Source #
mkBotSigFromUnit :: UnitSig -> RefSig Source #
Instances
Eq BranchSig Source # | |
Show BranchSig Source # | |
ShATermLG BranchSig Source # | |
Defined in ATC.DevGraph toShATermLG :: ATermTable -> BranchSig -> IO (ATermTable, Int) Source # fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, BranchSig) Source # |
getBranchSigNodes :: BranchSig -> Set Node Source #
type RefStUnitCtx = Map IRI RefSig Source #
matchesContext :: RefSigMap -> BStContext -> Bool Source #
namesMatchCtx :: [IRI] -> BStContext -> RefSigMap -> Bool Source #
modifyCtx :: [IRI] -> RefSigMap -> BStContext -> BStContext Source #
data GlobalEntry Source #
an entry of the global environment
SpecEntry ExtGenSig | |
ViewOrStructEntry Bool ExtViewSig | |
ArchOrRefEntry Bool RefSig | |
AlignEntry AlignSig | |
UnitEntry UnitSig | |
NetworkEntry GDiagram |
Instances
Show GlobalEntry Source # | |
Defined in Static.DevGraph showsPrec :: Int -> GlobalEntry -> ShowS show :: GlobalEntry -> String showList :: [GlobalEntry] -> ShowS | |
Pretty GlobalEntry Source # | |
Defined in Static.PrintDevGraph pretty :: GlobalEntry -> Doc Source # pretties :: [GlobalEntry] -> Doc Source # | |
ShATermLG GlobalEntry Source # | |
Defined in ATC.DevGraph toShATermLG :: ATermTable -> GlobalEntry -> IO (ATermTable, Int) Source # fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, GlobalEntry) Source # |
getGlobEntryNodes :: GlobalEntry -> Set Node Source #
AlignMor NodeSig GMorphism NodeSig | |
AlignSpan NodeSig GMorphism NodeSig GMorphism NodeSig | |
WAlign NodeSig GMorphism GMorphism NodeSig GMorphism GMorphism NodeSig NodeSig NodeSig |
type GlobalEnv = Map IRI GlobalEntry Source #
getGlobNodes :: GlobalEnv -> Set Node Source #
change and history types
the edit operations of the DGraph
InsertNode (LNode DGNodeLab) | |
DeleteNode (LNode DGNodeLab) | |
InsertEdge (LEdge DGLinkLab) | |
DeleteEdge (LEdge DGLinkLab) | |
SetNodeLab DGNodeLab (LNode DGNodeLab) |
Instances
ShATermLG HistElem Source # | |
Defined in ATC.DevGraph toShATermLG :: ATermTable -> HistElem -> IO (ATermTable, Int) Source # fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, HistElem) Source # |
type ProofHistory = SizedList HistElem Source #
data RTNodeType Source #
Instances
Eq RTNodeType Source # | |
Defined in Static.DevGraph (==) :: RTNodeType -> RTNodeType -> Bool (/=) :: RTNodeType -> RTNodeType -> Bool | |
Show RTNodeType Source # | |
Defined in Static.DevGraph showsPrec :: Int -> RTNodeType -> ShowS show :: RTNodeType -> String showList :: [RTNodeType] -> ShowS | |
Pretty RTNodeType Source # | |
Defined in Static.PrintDevGraph pretty :: RTNodeType -> Doc Source # pretties :: [RTNodeType] -> Doc Source # | |
ShATermLG RTNodeType Source # | |
Defined in ATC.DevGraph toShATermLG :: ATermTable -> RTNodeType -> IO (ATermTable, Int) Source # fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, RTNodeType) Source # |
RTNodeLab | |
|
data RTLinkType Source #
Instances
Eq RTLinkType Source # | |
Defined in Static.DevGraph (==) :: RTLinkType -> RTLinkType -> Bool (/=) :: RTLinkType -> RTLinkType -> Bool | |
Show RTLinkType Source # | |
Defined in Static.DevGraph showsPrec :: Int -> RTLinkType -> ShowS show :: RTLinkType -> String showList :: [RTLinkType] -> ShowS | |
ShATermLG RTLinkType Source # | |
Defined in ATC.DevGraph toShATermLG :: ATermTable -> RTLinkType -> IO (ATermTable, Int) Source # fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, RTLinkType) Source # |
Instances
Eq RTLinkLab Source # | |
Show RTLinkLab Source # | |
ShATermLG RTLinkLab Source # | |
Defined in ATC.DevGraph toShATermLG :: ATermTable -> RTLinkLab -> IO (ATermTable, Int) Source # fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, RTLinkLab) Source # |
updateNodeNameRT :: DGraph -> Node -> Bool -> String -> DGraph Source #
updateNodeNameSpecRT :: DGraph -> Node -> String -> DGraph Source #
copySubTree :: DGraph -> Node -> Maybe Node -> (DGraph, Map Node Node) Source #
copySubTreeN :: DGraph -> [Node] -> Map Node Node -> (DGraph, Map Node Node) Source #
addRefEdgeRT :: DGraph -> Node -> Node -> DGraph Source #
addEdgesToNodeRT :: DGraph -> [Node] -> Node -> DGraph Source #
data DiagNodeLab Source #
Instances
Show DiagNodeLab Source # | |
Defined in Static.DevGraph showsPrec :: Int -> DiagNodeLab -> ShowS show :: DiagNodeLab -> String showList :: [DiagNodeLab] -> ShowS | |
ShATermLG DiagNodeLab Source # | |
Defined in ATC.DevGraph toShATermLG :: ATermTable -> DiagNodeLab -> IO (ATermTable, Int) Source # fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, DiagNodeLab) Source # |
data DiagLinkLab Source #
DiagLink | |
|
Instances
Show DiagLinkLab Source # | |
Defined in Static.DevGraph showsPrec :: Int -> DiagLinkLab -> ShowS show :: DiagLinkLab -> String showList :: [DiagLinkLab] -> ShowS | |
ShATermLG DiagLinkLab Source # | |
Defined in ATC.DevGraph toShATermLG :: ATermTable -> DiagLinkLab -> IO (ATermTable, Int) Source # fromShATermLG :: LogicGraph -> Int -> ATermTable -> (ATermTable, DiagLinkLab) Source # |
Diagram | |
|
the actual development graph with auxiliary information. A
G_sign
should be stored in sigMap
under its gSignSelfIdx
. The
same applies to G_morphism
with morMap
and gMorphismSelfIdx
resp. G_theory
with thMap
and gTheorySelfIdx
.
DGraph | |
|
emptyLibEnv :: LibEnv Source #
an empty environment
utility functions
for node signatures
emptyG_sign :: AnyLogic -> G_sign Source #
getMaybeSig :: MaybeNode -> G_sign Source #
getNodeLogic :: NodeSig -> AnyLogic Source #
accessing node label
dgn_origin :: DGNodeLab -> DGOrigin Source #
get the origin of a non-reference node (partial)
dgn_libname :: DGNodeLab -> LibName Source #
get the referenced library (partial)
getDGNodeName :: DGNodeLab -> String Source #
gets the name of a development graph node as a string (total)
globOrLocTh :: DGNodeLab -> G_theory Source #
get the global theory of a node or the local one if missing
creating node content and label
newConsNodeInfo :: DGOrigin -> Conservativity -> DGNodeInfo Source #
create node info
newNodeInfo :: DGOrigin -> DGNodeInfo Source #
create default content
newRefInfo :: LibName -> Node -> DGNodeInfo Source #
create a reference node part
newInfoNodeLab :: NodeName -> DGNodeInfo -> G_theory -> DGNodeLab Source #
create a new node label
newNodeLab :: NodeName -> DGOrigin -> G_theory -> DGNodeLab Source #
create a new node label using newNodeInfo
and newInfoNodeLab
handle the lock of a node
treatNodeLock :: (MVar () -> a) -> DGNodeLab -> a Source #
wrapper to access the maybe lock
tryLockLocal :: DGNodeLab -> IO Bool Source #
Tries to acquire the local lock. Return False if already acquired.
unlockLocal :: DGNodeLab -> IO () Source #
Releases the local lock.
edge label equalities
eqDGLinkLabContent :: DGLinkLab -> DGLinkLab -> Bool Source #
equality without comparing the edge ids
eqDGLinkLabById :: DGLinkLab -> DGLinkLab -> Bool Source #
equality comparing ids only
setting index maps
setMorMapDG :: Map MorId G_morphism -> DGraph -> DGraph Source #
looking up in index maps
lookupMorMapDG :: MorId -> DGraph -> Maybe G_morphism Source #
getting index maps and their maximal index
lookup other graph parts
lookupGlobalEnvDG :: IRI -> DGraph -> Maybe GlobalEntry Source #
lookupInAllRefNodesDG :: DGNodeInfo -> DGraph -> Maybe Node Source #
lookup a reference node for a given libname and node
lookup nodes by their names or other properties
lookupNodeByName :: String -> DGraph -> [LNode DGNodeLab] Source #
lookup a node in the graph by its name, using showName to convert nodenames.
lookupUniqueNodeByName :: String -> DGraph -> Maybe (LNode DGNodeLab) Source #
filterLocalNodesByName :: String -> DGraph -> [LNode DGNodeLab] Source #
filters all local nodes in the graph by their names, using showName
to convert nodenames. See also lookupNodeByName
.
filterRefNodesByName :: String -> LibName -> DGraph -> [LNode DGNodeLab] Source #
filter all ref nodes in the graph by their names, using showName
to convert nodenames. See also lookupNodeByName
.
lookupLocalNodeByNameInEnv :: LibEnv -> String -> Maybe (DGraph, LNode DGNodeLab) Source #
Given a LibEnv
we search each DGraph in it for a (maybe referenced) node
with the given name. We return the labeled node and the Graph where this node
resides as local node. See also lookupLocalNode
.
lookupLocalNodeByName :: LibEnv -> DGraph -> String -> Maybe (DGraph, LNode DGNodeLab) Source #
We search only the given DGraph
for a (maybe referenced) node with the
given name. We return the labeled node and the Graph where this node resides
as local node. See also lookupLocalNode
.
lookupLocalNode :: LibEnv -> DGraph -> Node -> (DGraph, LNode DGNodeLab) Source #
Given a Node and a DGraph
we follow the node to the graph where it is
defined as a local node.
lookupRefNode :: LibEnv -> LibName -> DGraph -> Node -> (LibName, DGraph, LNode DGNodeLab) Source #
Given a Node and a DGraph
we follow the node to the graph where it is
defined .
lookupRefNodeM :: LibEnv -> Maybe LibName -> DGraph -> Node -> (Maybe LibName, DGraph, LNode DGNodeLab) Source #
accessing the actual graph
getNewNodeDG :: DGraph -> Node Source #
get the next available node id
labNodesDG :: DGraph -> [LNode DGNodeLab] Source #
get all the nodes
labEdgesDG :: DGraph -> [LEdge DGLinkLab] Source #
get all the edges
innDG :: DGraph -> Node -> [LEdge DGLinkLab] Source #
get all the incoming ledges of the given node in a given DG
outDG :: DGraph -> Node -> [LEdge DGLinkLab] Source #
get all the outgoing ledges of the given node in a given DG
getNameOfNode :: Node -> DGraph -> String Source #
get the name of a node from the number of node
newNodesDG :: Int -> DGraph -> [Node] Source #
gets the given number of new node-ids in a given DG.
safeContextDG :: String -> DGraph -> Node -> Context DGNodeLab DGLinkLab Source #
get the context and throw input string as error message
manipulate graph
labelNodeDG :: LNode DGNodeLab -> DGraph -> (DGraph, DGNodeLab) Source #
sets the node with new label and returns the new graph and the old label
delNodesDG :: [Node] -> DGraph -> DGraph Source #
delete a list of nodes out of the given DG
insNodesDG :: [LNode DGNodeLab] -> DGraph -> DGraph Source #
insert a new node with the given node content into a given DGraph
insInclEdgeDG :: LogicGraph -> DGraph -> NodeSig -> NodeSig -> Result DGraph Source #
inserts an edge between two nodes, labelled with inclusion
insLEdgeDG :: LEdge DGLinkLab -> DGraph -> (LEdge DGLinkLab, DGraph) Source #
insert a labeled edge into a given DG, return possibly new id of edge
compareLinks :: DGLinkLab -> DGLinkLab -> Ordering Source #
insLEdgeNubDG :: LEdge DGLinkLab -> DGraph -> DGraph Source #
tries to insert a labeled edge into a given DG, but if this edge already exists, then does nothing.
insEdgeAsIs :: LEdge DGLinkLab -> DGraph -> DGraph Source #
inserts a new edge into the DGraph using it's own edgeId. ATTENTION: the caller must ensure that an edgeId is not used twice
insEdgesDG :: [LEdge DGLinkLab] -> DGraph -> DGraph Source #
insert a list of labeled edge into a given DG
mkGraphDG :: [LNode DGNodeLab] -> [LEdge DGLinkLab] -> DGraph -> DGraph Source #
merge a list of lnodes and ledges into a given DG
lookupUniqueLink :: MonadFail m => Node -> EdgeId -> DGraph -> m (LEdge DGLinkLab) Source #
find a unique link given its source node and edgeId
top-level functions
initLocking :: DGraph -> LNode DGNodeLab -> IO (DGraph, DGNodeLab) Source #
initializes the MVar for locking if nessesary
lookupDGraph :: LibName -> LibEnv -> DGraph Source #
returns the DGraph that belongs to the given library name
computeLocalTheory :: Monad m => LibEnv -> LibName -> Node -> m G_theory Source #
compute the theory of a given node. If this node is a DGRef, the referenced node is looked up first.
test link types
liftE :: (DGLinkType -> a) -> LEdge DGLinkLab -> a Source #
isGlobalDef :: DGLinkType -> Bool Source #
isLocalDef :: DGLinkType -> Bool Source #
isHidingDef :: DGLinkType -> Bool Source #
isDefEdge :: DGLinkType -> Bool Source #
isLocalEdge :: DGLinkType -> Bool Source #
isHidingEdge :: DGLinkType -> Bool Source #
create link types
hidingThm :: Node -> GMorphism -> DGLinkType Source #
localOrGlobalThm :: Scope -> Conservativity -> DGLinkType Source #
localOrGlobalDef :: Scope -> Conservativity -> DGLinkType Source #
link conservativity
getCons :: DGLinkType -> Conservativity Source #
getConservativity :: LEdge DGLinkLab -> Conservativity Source #
returns the Conservativity if the given edge has one, otherwise none
getConservativityOfPath :: [LEdge DGLinkLab] -> Conservativity Source #
returns the conservativity of the given path
bottom up traversal
getLibDepRel :: LibEnv -> Rel LibName Source #
Creates a LibName relation wrt dependencies via reference nodes
getTopsortedLibs :: LibEnv -> [LibName] Source #
dependentLibs :: LibName -> LibEnv -> [LibName] Source #
Get imported libs in topological order, i.e. lib(s) without imports first. The input lib-name will be last
topsortedNodes :: DGraph -> [LNode DGNodeLab] Source #
changedPendingEdges :: DGraph -> [LEdge DGLinkLab] Source #
duplicateDefEdges :: DGraph -> [Edge] Source #