Hets - the Heterogeneous Tool Set

Copyrightuni-bremen and DFKI
LicenseGPLv2 or higher, see LICENSE.txt
Maintainerr.pascanu@jacobs-university.de
Stabilityprovisional
Portabilityportable
Safe HaskellNone

CMDL.Utils

Description

CMDL.Utils contains different basic functions that are used throughout the CMDL interface and could not be found in Prelude

Synopsis

Documentation

decomposeIntoGoals :: String -> ([String], [String], [String], [String]) Source #

Given a string the function decomposes it into 4 lists, one for node goals, the other for edges, the third for numbered edges and the last for names that could not be processed due to errors

obtainNodeList :: [String] -> [LNode DGNodeLab] -> ([String], [LNode DGNodeLab]) Source #

Given a list of node names and the list of all nodes the function returns all the nodes that have their name in the name list

createEdgeNames :: [LNode DGNodeLab] -> [LEdge DGLinkLab] -> [(String, LEdge DGLinkLab)] Source #

Given a list of edges and the complete list of all edges computes not only the names of edges but also the numbered name of edges

obtainEdgeList :: [String] -> [String] -> [LNode DGNodeLab] -> [LEdge DGLinkLab] -> ([String], [LEdge DGLinkLab]) Source #

Given a list of edge names and numbered edge names and the list of all nodes and edges the function identifies the edges that appear in the name lists

obtainGoalEdgeList :: [String] -> [String] -> [LNode DGNodeLab] -> [LEdge DGLinkLab] -> ([String], [LEdge DGLinkLab]) Source #

Giben a listof edgenamesand numbered edge names and the list of all nodes and edges the function identifies the edges that appearin the name list and are also goals

finishedNames :: [String] -> String -> ([String], String) Source #

check if edges are to be completed in the presence of nodes

stripComments :: String -> String Source #

Function that given a string removes comments contained in the string

lastChar :: String -> Char Source #

The function behaves exactly like last just that in case of an empty list returns the space character (it works only for lists of chars)

lastString :: [String] -> String Source #

The function behaves exactly like last just that in case of an empty list returns the empty string (it is meant only for list of strings)

safeTail :: [a] -> [a] Source #

The function behaves exactly as tail just that in the case of empty list returns an empty list instead of an error

fileFilter :: String -> [String] -> [String] -> IO [String] Source #

Given a list of files and folders the function filters only directory names and files ending in extenstion .casl or .het or .dol

fileExtend :: String -> [String] -> [String] -> IO [String] Source #

Given a list of files and folders the function expands the list adding the content of all folders in the list

prettyPrintErrList :: [String] -> String Source #

The function nicely outputs a list of errors

edgeContainsGoals :: LEdge DGLinkLab -> Bool Source #

Given an edge decides if it contains goals or not

isOpenConsEdge :: LEdge DGLinkLab -> Bool Source #

Given an edge: does it contain an open conservativity goal or not

checkIntString :: String -> Bool Source #

Checks if a string represents a int or not

delExtension :: String -> String Source #

arrowLink :: DGLinkLab -> String Source #

Generates a string representing the type of link