Safe Haskell | None |
---|---|
Language | Haskell2010 |
Generates Alloy4.1 or 4.2 code for a Clafer model
- data Concat
- type Position = ((LineNo, ColNo), (LineNo, ColNo))
- data IrTrace
- mkConcat :: IrTrace -> String -> Concat
- iscPrimitive :: Concat -> Bool
- flatten :: Concat -> String
- (+++) :: Concat -> Concat -> Concat
- cconcat :: [Concat] -> Concat
- cintercalate :: Concat -> [Concat] -> Concat
- filterNull :: [Concat] -> [Concat]
- isNull :: Concat -> Bool
- cunlines :: [Concat] -> Concat
- genModule :: ClaferArgs -> (IModule, GEnv) -> [(UID, Integer)] -> (Result, [(Span, IrTrace)])
- header :: ClaferArgs -> [(UID, Integer)] -> Concat
- genScope :: (UID, Integer) -> String
- genDeclarationGoalsOnly :: ClaferArgs -> IElement -> Concat
- genDeclaration :: ClaferArgs -> IElement -> Concat
- mkFact :: Concat -> Concat
- mkMetric :: String -> Concat -> Concat
- mkSet :: Concat -> Concat
- showSet :: Concat -> [Concat] -> Concat
- optShowSet :: [Concat] -> Concat
- genClafer :: ClaferArgs -> [String] -> IClafer -> Concat
- transPrimitive :: IClafer -> IClafer
- claferDecl :: IClafer -> Concat -> Concat
- genOptCard :: IClafer -> Concat
- genRelations :: ClaferArgs -> IClafer -> [Concat]
- genRelName :: String -> String
- genRel :: String -> IClafer -> String -> String
- genAlloyRel :: String -> String -> String -> String
- refType :: ClaferArgs -> IClafer -> Concat
- getTarget :: PExp -> PExp
- genType :: ClaferArgs -> PExp -> Concat
- genConstraints :: ClaferArgs -> [String] -> IClafer -> [Concat]
- genParentConst :: [String] -> IClafer -> Concat
- genOptParentConst :: IClafer -> Concat
- genGroupConst :: IClafer -> Concat
- mkCard :: String -> Bool -> String -> (Integer, Integer) -> Concat
- genPathConst :: ClaferArgs -> String -> [String] -> IClafer -> Concat
- isRefPath :: IClafer -> Bool
- isSimplePath :: [PExp] -> Bool
- genCard :: String -> Maybe Interval -> Concat
- genCardCrude :: Maybe Interval -> String
- genIntervalCrude :: Interval -> String
- genInterval :: String -> Bool -> String -> Interval -> Concat
- cardConcat :: String -> Bool -> [Concat] -> Concat
- cardLowerConcat :: String -> Bool -> [Concat] -> Concat
- cardUpperConcat :: String -> Bool -> [Concat] -> Concat
- genExInteger :: String -> Interval -> Integer -> Maybe Result
- genPExp :: ClaferArgs -> [String] -> PExp -> Concat
- genPExp' :: ClaferArgs -> [String] -> PExp -> Concat
- transformExp :: IExp -> IExp
- genIFunExp :: String -> ClaferArgs -> [String] -> IExp -> Concat
- optBrArg :: ClaferArgs -> [String] -> PExp -> Concat
- interleave :: [Concat] -> [Concat] -> [Concat]
- brArg :: (a -> Concat) -> a -> Concat
- genOp :: Bool -> String -> [String]
- adjustPExp :: [String] -> PExp -> PExp
- adjustIExp :: [String] -> IExp -> IExp
- adjustNav :: [String] -> IExp -> (IExp, [String])
- genQuant :: IQuant -> String
- genDecl :: ClaferArgs -> [String] -> IDecl -> Concat
- genDisj :: Bool -> String
- data AlloyEnv = AlloyEnv {}
- mapLineCol :: Concat -> [(Span, IrTrace)]
- addCode :: MonadState AlloyEnv m => String -> m ()
- mapLineCol' :: MonadState AlloyEnv m => Concat -> m ()
- addColumn :: Interval -> Integer -> Interval
- countLeading :: String -> String -> Integer
- countTrailing :: String -> String -> Integer
- lineno :: (Integer, ColNo) -> String -> (Integer, ColNo)
- firstCol :: ColNo
- firstLine :: LineNo
- removeright :: PExp -> PExp
- getRight :: PExp -> PExp
Documentation
representation of strings in chunks (for line/column numbering)
iscPrimitive :: Concat -> Bool Source
cintercalate :: Concat -> [Concat] -> Concat Source
filterNull :: [Concat] -> [Concat] Source
genModule :: ClaferArgs -> (IModule, GEnv) -> [(UID, Integer)] -> (Result, [(Span, IrTrace)]) Source
Alloy code generation 07th Mayo 2012 Rafael Olaechea Added Logic to print a goal block in case there is at least one goal.
genDeclaration :: ClaferArgs -> IElement -> Concat Source
optShowSet :: [Concat] -> Concat Source
transPrimitive :: IClafer -> IClafer Source
claferDecl :: IClafer -> Concat -> Concat Source
genOptCard :: IClafer -> Concat Source
genRelations :: ClaferArgs -> IClafer -> [Concat] Source
genRelName :: String -> String Source
refType :: ClaferArgs -> IClafer -> Concat Source
genType :: ClaferArgs -> PExp -> Concat Source
genConstraints :: ClaferArgs -> [String] -> IClafer -> [Concat] Source
genParentConst :: [String] -> IClafer -> Concat Source
genOptParentConst :: IClafer -> Concat Source
genGroupConst :: IClafer -> Concat Source
genPathConst :: ClaferArgs -> String -> [String] -> IClafer -> Concat Source
isSimplePath :: [PExp] -> Bool Source
genCardCrude :: Maybe Interval -> String Source
genIntervalCrude :: Interval -> String Source
transformExp :: IExp -> IExp Source
genIFunExp :: String -> ClaferArgs -> [String] -> IExp -> Concat Source
interleave :: [Concat] -> [Concat] -> [Concat] Source
adjustPExp :: [String] -> PExp -> PExp Source
adjustIExp :: [String] -> IExp -> IExp Source
mapLineCol :: Concat -> [(Span, IrTrace)] Source
addCode :: MonadState AlloyEnv m => String -> m () Source
mapLineCol' :: MonadState AlloyEnv m => Concat -> m () Source
countLeading :: String -> String -> Integer Source
countTrailing :: String -> String -> Integer Source
removeright :: PExp -> PExp Source