Safe Haskell | None |
---|
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 -> BoolSource
cintercalate :: Concat -> [Concat] -> ConcatSource
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.
header :: ClaferArgs -> [(UID, Integer)] -> ConcatSource
genDeclaration :: ClaferArgs -> IElement -> ConcatSource
optShowSet :: [Concat] -> ConcatSource
genClafer :: ClaferArgs -> [String] -> IClafer -> ConcatSource
claferDecl :: IClafer -> Concat -> ConcatSource
genOptCard :: IClafer -> ConcatSource
genRelations :: ClaferArgs -> IClafer -> [Concat]Source
genRelName :: String -> StringSource
genAlloyRel :: String -> String -> String -> StringSource
refType :: ClaferArgs -> IClafer -> ConcatSource
genType :: ClaferArgs -> PExp -> ConcatSource
genConstraints :: ClaferArgs -> [String] -> IClafer -> [Concat]Source
genParentConst :: [String] -> IClafer -> ConcatSource
genGroupConst :: IClafer -> ConcatSource
genPathConst :: ClaferArgs -> String -> [String] -> IClafer -> ConcatSource
isSimplePath :: [PExp] -> BoolSource
genCardCrude :: Maybe Interval -> StringSource
genIntervalCrude :: Interval -> StringSource
genInterval :: String -> Bool -> String -> Interval -> ConcatSource
cardConcat :: String -> Bool -> [Concat] -> ConcatSource
cardLowerConcat :: String -> Bool -> [Concat] -> ConcatSource
cardUpperConcat :: String -> Bool -> [Concat] -> ConcatSource
genExInteger :: String -> Interval -> Integer -> Maybe ResultSource
genPExp :: ClaferArgs -> [String] -> PExp -> ConcatSource
genPExp' :: ClaferArgs -> [String] -> PExp -> ConcatSource
transformExp :: IExp -> IExpSource
genIFunExp :: String -> ClaferArgs -> [String] -> IExp -> ConcatSource
optBrArg :: ClaferArgs -> [String] -> PExp -> ConcatSource
interleave :: [Concat] -> [Concat] -> [Concat]Source
adjustPExp :: [String] -> PExp -> PExpSource
adjustIExp :: [String] -> IExp -> IExpSource
genDecl :: ClaferArgs -> [String] -> IDecl -> ConcatSource
mapLineCol :: Concat -> [(Span, IrTrace)]Source
addCode :: MonadState AlloyEnv m => String -> m ()Source
mapLineCol' :: MonadState AlloyEnv m => Concat -> m ()Source
countLeading :: String -> String -> IntegerSource
countTrailing :: String -> String -> IntegerSource
removeright :: PExp -> PExpSource