claferIG 0.3.10 → 0.4.0
raw patch · 9 files changed
+109/−99 lines, 9 filesdep ~HaXmldep ~arraydep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: HaXml, array, base, clafer, claferIG, cmdargs, containers, directory, filepath, haskeline, mtl, parsec, process, string-conversions, tasty, tasty-hunit, tasty-th, transformers
API changes (from Hackage documentation)
- Language.Clafer.IG.AlloyIGInterface: alloyModel :: AlloyIGEnv -> String
- Language.Clafer.IG.AlloyIGInterface: core :: UnsatCore -> [Span]
- Language.Clafer.IG.AlloyIGInterface: globalScope :: AlloyIGEnv -> Integer
- Language.Clafer.IG.AlloyIGInterface: instance (Monad m, Functor m) => Applicative (AlloyIGT m)
- Language.Clafer.IG.AlloyIGInterface: instance Eq Multiplicity
- Language.Clafer.IG.AlloyIGInterface: instance Functor m => Functor (AlloyIGT m)
- Language.Clafer.IG.AlloyIGInterface: instance Monad m => Monad (AlloyIGT m)
- Language.Clafer.IG.AlloyIGInterface: instance MonadException m => MonadException (AlloyIGT m)
- Language.Clafer.IG.AlloyIGInterface: instance MonadIO m => MonadIO (AlloyIGT m)
- Language.Clafer.IG.AlloyIGInterface: instance MonadTrans AlloyIGT
- Language.Clafer.IG.AlloyIGInterface: instance Read Multiplicity
- Language.Clafer.IG.AlloyIGInterface: instance Show Multiplicity
- Language.Clafer.IG.AlloyIGInterface: instance Show UnsatCore
- Language.Clafer.IG.AlloyIGInterface: s_multiplicity :: Sig -> Multiplicity
- Language.Clafer.IG.AlloyIGInterface: s_name :: Sig -> String
- Language.Clafer.IG.AlloyIGInterface: s_startingScope :: Sig -> Maybe Integer
- Language.Clafer.IG.AlloyIGInterface: s_subset :: Sig -> Maybe String
- Language.Clafer.IG.AlloyIGInterface: scopes :: AlloyIGEnv -> Map String Integer
- Language.Clafer.IG.AlloyIGInterface: sigMap :: AlloyIGEnv -> Map String Sig
- Language.Clafer.IG.ClaferIG: addTypes :: IGArgs -> Bool
- Language.Clafer.IG.ClaferIG: all :: IGArgs -> Maybe Integer
- Language.Clafer.IG.ClaferIG: alloyModelInstance :: Instance -> String
- Language.Clafer.IG.ClaferIG: alloySolution :: IGArgs -> FilePath
- Language.Clafer.IG.ClaferIG: bitwidth :: IGArgs -> Integer
- Language.Clafer.IG.ClaferIG: check_duplicates_comp :: IGArgs -> Bool
- Language.Clafer.IG.ClaferIG: claferEnv' :: ClaferIGEnv -> ClaferEnv
- Language.Clafer.IG.ClaferIG: claferIGArgs :: ClaferIGEnv -> IGArgs
- Language.Clafer.IG.ClaferIG: claferModel :: ClaferIGEnv -> String
- Language.Clafer.IG.ClaferIG: claferModelFile :: IGArgs -> FilePath
- Language.Clafer.IG.ClaferIG: constraints :: ClaferIGEnv -> [Constraint]
- Language.Clafer.IG.ClaferIG: counterexample :: Instance -> Maybe Counterexample
- Language.Clafer.IG.ClaferIG: counterexampleAlloyInstance :: Counterexample -> String
- Language.Clafer.IG.ClaferIG: counterexampleInstance :: Counterexample -> ClaferModel
- Language.Clafer.IG.ClaferIG: flatten_inheritance_comp :: IGArgs -> Bool
- Language.Clafer.IG.ClaferIG: info :: ClaferIGEnv -> UIDIClaferMap
- Language.Clafer.IG.ClaferIG: instance (Monad m, Functor m) => Applicative (ClaferIGT m)
- Language.Clafer.IG.ClaferIG: instance Data IGArgs
- Language.Clafer.IG.ClaferIG: instance Functor m => Functor (ClaferIGT m)
- Language.Clafer.IG.ClaferIG: instance Monad m => Monad (ClaferIGT m)
- Language.Clafer.IG.ClaferIG: instance MonadException m => MonadException (ClaferIGT m)
- Language.Clafer.IG.ClaferIG: instance MonadIO m => MonadIO (ClaferIGT m)
- Language.Clafer.IG.ClaferIG: instance MonadTrans ClaferIGT
- Language.Clafer.IG.ClaferIG: instance Show IGArgs
- Language.Clafer.IG.ClaferIG: instance Typeable IGArgs
- Language.Clafer.IG.ClaferIG: json :: IGArgs -> Bool
- Language.Clafer.IG.ClaferIG: lineNumMap :: ClaferIGEnv -> Map Integer String
- Language.Clafer.IG.ClaferIG: maxInt :: IGArgs -> Integer
- Language.Clafer.IG.ClaferIG: modelInstance :: Instance -> ClaferModel
- Language.Clafer.IG.ClaferIG: no_layout_comp :: IGArgs -> Bool
- Language.Clafer.IG.ClaferIG: qNameMaps :: ClaferIGEnv -> QNameMaps
- Language.Clafer.IG.ClaferIG: removedConstraints :: Counterexample -> [Constraint]
- Language.Clafer.IG.ClaferIG: saveDir :: IGArgs -> Maybe FilePath
- Language.Clafer.IG.ClaferIG: scope_strategy_comp :: IGArgs -> ScopeStrategy
- Language.Clafer.IG.ClaferIG: skip_resolver_comp :: IGArgs -> Bool
- Language.Clafer.IG.ClaferIG: strMap :: ClaferIGEnv -> Map Int String
- Language.Clafer.IG.ClaferIG: unsatConstraints :: Instance -> [Constraint]
- Language.Clafer.IG.ClaferIG: useUids :: IGArgs -> Bool
- Language.Clafer.IG.ClaferModel: c_alias :: Value -> Id
- Language.Clafer.IG.ClaferModel: c_children :: Clafer -> [Clafer]
- Language.Clafer.IG.ClaferModel: c_id :: Clafer -> Id
- Language.Clafer.IG.ClaferModel: c_topLevel :: ClaferModel -> [Clafer]
- Language.Clafer.IG.ClaferModel: c_value :: Clafer -> Maybe Value
- Language.Clafer.IG.ClaferModel: i_name :: Id -> String
- Language.Clafer.IG.ClaferModel: i_ordinal :: Id -> Int
- Language.Clafer.IG.ClaferModel: instance Eq Clafer
- Language.Clafer.IG.ClaferModel: instance Eq Id
- Language.Clafer.IG.ClaferModel: instance Eq Node
- Language.Clafer.IG.ClaferModel: instance Eq Value
- Language.Clafer.IG.ClaferModel: instance Ord Id
- Language.Clafer.IG.ClaferModel: instance Ord Node
- Language.Clafer.IG.ClaferModel: instance Show Clafer
- Language.Clafer.IG.ClaferModel: instance Show ClaferModel
- Language.Clafer.IG.ClaferModel: instance Show FamilyTree
- Language.Clafer.IG.ClaferModel: instance Show Id
- Language.Clafer.IG.ClaferModel: instance Show Node
- Language.Clafer.IG.ClaferModel: instance Show Value
- Language.Clafer.IG.ClaferModel: v_str :: Value -> String
- Language.Clafer.IG.ClaferModel: v_value :: Value -> Int
- Language.Clafer.IG.CommandLine: instance Show AutoComplete
- Language.Clafer.IG.CommandLineParser: instance Show Command
- Language.Clafer.IG.CommandLineParser: instance Show UnsatCoreMinimization
- Language.Clafer.IG.Constraints: cardinality :: ClaferInfo -> Cardinality
- Language.Clafer.IG.Constraints: claferInfo :: Constraint -> ClaferInfo
- Language.Clafer.IG.Constraints: constraintInfo :: Constraint -> ConstraintInfo
- Language.Clafer.IG.Constraints: instance Eq Cardinality
- Language.Clafer.IG.Constraints: instance Eq ClaferInfo
- Language.Clafer.IG.Constraints: instance Eq Constraint
- Language.Clafer.IG.Constraints: instance Eq ConstraintInfo
- Language.Clafer.IG.Constraints: instance Show Cardinality
- Language.Clafer.IG.Constraints: instance Show ClaferInfo
- Language.Clafer.IG.Constraints: instance Show Constraint
- Language.Clafer.IG.Constraints: instance Show ConstraintInfo
- Language.Clafer.IG.Constraints: lower :: Cardinality -> Integer
- Language.Clafer.IG.Constraints: pId :: ConstraintInfo -> String
- Language.Clafer.IG.Constraints: pos :: ConstraintInfo -> Span
- Language.Clafer.IG.Constraints: range :: Constraint -> Span
- Language.Clafer.IG.Constraints: syntax :: ConstraintInfo -> String
- Language.Clafer.IG.Constraints: uniqueId :: ClaferInfo -> String
- Language.Clafer.IG.Constraints: upper :: Cardinality -> Maybe Integer
- Language.Clafer.IG.Solution: a_label :: Atom -> String
- Language.Clafer.IG.Solution: f_id :: Field -> Int
- Language.Clafer.IG.Solution: f_label :: Field -> String
- Language.Clafer.IG.Solution: f_parentId :: Field -> Int
- Language.Clafer.IG.Solution: f_tuples :: Field -> [Tuple]
- Language.Clafer.IG.Solution: instance Show Atom
- Language.Clafer.IG.Solution: instance Show Field
- Language.Clafer.IG.Solution: instance Show Sig
- Language.Clafer.IG.Solution: instance Show Solution
- Language.Clafer.IG.Solution: instance Show Tuple
- Language.Clafer.IG.Solution: s_atoms :: Sig -> [Atom]
- Language.Clafer.IG.Solution: s_fields :: Solution -> [Field]
- Language.Clafer.IG.Solution: s_id :: Sig -> Int
- Language.Clafer.IG.Solution: s_label :: Sig -> String
- Language.Clafer.IG.Solution: s_parentId :: Sig -> Maybe Int
- Language.Clafer.IG.Solution: s_sigs :: Solution -> [Sig]
- Language.Clafer.IG.Solution: t_from :: Tuple -> Atom
- Language.Clafer.IG.Solution: t_fromType :: Tuple -> Int
- Language.Clafer.IG.Solution: t_to :: Tuple -> Atom
- Language.Clafer.IG.Solution: t_toType :: Tuple -> Int
- Language.Clafer.IG.Sugarer: instance Show Census
+ Language.Clafer.IG.AlloyIGInterface: [alloyModel] :: AlloyIGEnv -> String
+ Language.Clafer.IG.AlloyIGInterface: [core] :: UnsatCore -> [Span]
+ Language.Clafer.IG.AlloyIGInterface: [globalScope] :: AlloyIGEnv -> Integer
+ Language.Clafer.IG.AlloyIGInterface: [s_multiplicity] :: Sig -> Multiplicity
+ Language.Clafer.IG.AlloyIGInterface: [s_name] :: Sig -> String
+ Language.Clafer.IG.AlloyIGInterface: [s_startingScope] :: Sig -> Maybe Integer
+ Language.Clafer.IG.AlloyIGInterface: [s_subset] :: Sig -> Maybe String
+ Language.Clafer.IG.AlloyIGInterface: [scopes] :: AlloyIGEnv -> Map String Integer
+ Language.Clafer.IG.AlloyIGInterface: [sigMap] :: AlloyIGEnv -> Map String Sig
+ Language.Clafer.IG.AlloyIGInterface: instance Control.Monad.IO.Class.MonadIO m => Control.Monad.IO.Class.MonadIO (Language.Clafer.IG.AlloyIGInterface.AlloyIGT m)
+ Language.Clafer.IG.AlloyIGInterface: instance Control.Monad.Trans.Class.MonadTrans Language.Clafer.IG.AlloyIGInterface.AlloyIGT
+ Language.Clafer.IG.AlloyIGInterface: instance GHC.Base.Functor m => GHC.Base.Functor (Language.Clafer.IG.AlloyIGInterface.AlloyIGT m)
+ Language.Clafer.IG.AlloyIGInterface: instance GHC.Base.Monad m => GHC.Base.Applicative (Language.Clafer.IG.AlloyIGInterface.AlloyIGT m)
+ Language.Clafer.IG.AlloyIGInterface: instance GHC.Base.Monad m => GHC.Base.Monad (Language.Clafer.IG.AlloyIGInterface.AlloyIGT m)
+ Language.Clafer.IG.AlloyIGInterface: instance GHC.Classes.Eq Language.Clafer.IG.AlloyIGInterface.Multiplicity
+ Language.Clafer.IG.AlloyIGInterface: instance GHC.Read.Read Language.Clafer.IG.AlloyIGInterface.Multiplicity
+ Language.Clafer.IG.AlloyIGInterface: instance GHC.Show.Show Language.Clafer.IG.AlloyIGInterface.Multiplicity
+ Language.Clafer.IG.AlloyIGInterface: instance GHC.Show.Show Language.Clafer.IG.AlloyIGInterface.UnsatCore
+ Language.Clafer.IG.AlloyIGInterface: instance System.Console.Haskeline.MonadException.MonadException m => System.Console.Haskeline.MonadException.MonadException (Language.Clafer.IG.AlloyIGInterface.AlloyIGT m)
+ Language.Clafer.IG.ClaferIG: [addTypes] :: IGArgs -> Bool
+ Language.Clafer.IG.ClaferIG: [all] :: IGArgs -> Maybe Integer
+ Language.Clafer.IG.ClaferIG: [alloyModelInstance] :: Instance -> String
+ Language.Clafer.IG.ClaferIG: [alloySolution] :: IGArgs -> FilePath
+ Language.Clafer.IG.ClaferIG: [bitwidth] :: IGArgs -> Integer
+ Language.Clafer.IG.ClaferIG: [check_duplicates_comp] :: IGArgs -> Bool
+ Language.Clafer.IG.ClaferIG: [claferEnv'] :: ClaferIGEnv -> ClaferEnv
+ Language.Clafer.IG.ClaferIG: [claferIGArgs] :: ClaferIGEnv -> IGArgs
+ Language.Clafer.IG.ClaferIG: [claferModelFile] :: IGArgs -> FilePath
+ Language.Clafer.IG.ClaferIG: [claferModel] :: ClaferIGEnv -> String
+ Language.Clafer.IG.ClaferIG: [constraints] :: ClaferIGEnv -> [Constraint]
+ Language.Clafer.IG.ClaferIG: [counterexampleAlloyInstance] :: Counterexample -> String
+ Language.Clafer.IG.ClaferIG: [counterexampleInstance] :: Counterexample -> ClaferModel
+ Language.Clafer.IG.ClaferIG: [counterexample] :: Instance -> Maybe Counterexample
+ Language.Clafer.IG.ClaferIG: [flatten_inheritance_comp] :: IGArgs -> Bool
+ Language.Clafer.IG.ClaferIG: [info] :: ClaferIGEnv -> UIDIClaferMap
+ Language.Clafer.IG.ClaferIG: [json] :: IGArgs -> Bool
+ Language.Clafer.IG.ClaferIG: [lineNumMap] :: ClaferIGEnv -> Map Integer String
+ Language.Clafer.IG.ClaferIG: [maxInt] :: IGArgs -> Integer
+ Language.Clafer.IG.ClaferIG: [modelInstance] :: Instance -> ClaferModel
+ Language.Clafer.IG.ClaferIG: [no_layout_comp] :: IGArgs -> Bool
+ Language.Clafer.IG.ClaferIG: [qNameMaps] :: ClaferIGEnv -> QNameMaps
+ Language.Clafer.IG.ClaferIG: [removedConstraints] :: Counterexample -> [Constraint]
+ Language.Clafer.IG.ClaferIG: [saveDir] :: IGArgs -> Maybe FilePath
+ Language.Clafer.IG.ClaferIG: [scope_strategy_comp] :: IGArgs -> ScopeStrategy
+ Language.Clafer.IG.ClaferIG: [skip_resolver_comp] :: IGArgs -> Bool
+ Language.Clafer.IG.ClaferIG: [strMap] :: ClaferIGEnv -> Map Int String
+ Language.Clafer.IG.ClaferIG: [unsatConstraints] :: Instance -> [Constraint]
+ Language.Clafer.IG.ClaferIG: [useUids] :: IGArgs -> Bool
+ Language.Clafer.IG.ClaferIG: instance Control.Monad.IO.Class.MonadIO m => Control.Monad.IO.Class.MonadIO (Language.Clafer.IG.ClaferIG.ClaferIGT m)
+ Language.Clafer.IG.ClaferIG: instance Control.Monad.Trans.Class.MonadTrans Language.Clafer.IG.ClaferIG.ClaferIGT
+ Language.Clafer.IG.ClaferIG: instance Data.Data.Data Language.Clafer.IG.ClaferIG.IGArgs
+ Language.Clafer.IG.ClaferIG: instance GHC.Base.Functor m => GHC.Base.Functor (Language.Clafer.IG.ClaferIG.ClaferIGT m)
+ Language.Clafer.IG.ClaferIG: instance GHC.Base.Monad m => GHC.Base.Applicative (Language.Clafer.IG.ClaferIG.ClaferIGT m)
+ Language.Clafer.IG.ClaferIG: instance GHC.Base.Monad m => GHC.Base.Monad (Language.Clafer.IG.ClaferIG.ClaferIGT m)
+ Language.Clafer.IG.ClaferIG: instance GHC.Show.Show Language.Clafer.IG.ClaferIG.IGArgs
+ Language.Clafer.IG.ClaferIG: instance System.Console.Haskeline.MonadException.MonadException m => System.Console.Haskeline.MonadException.MonadException (Language.Clafer.IG.ClaferIG.ClaferIGT m)
+ Language.Clafer.IG.ClaferModel: [c_alias] :: Value -> Id
+ Language.Clafer.IG.ClaferModel: [c_children] :: Clafer -> [Clafer]
+ Language.Clafer.IG.ClaferModel: [c_id] :: Clafer -> Id
+ Language.Clafer.IG.ClaferModel: [c_topLevel] :: ClaferModel -> [Clafer]
+ Language.Clafer.IG.ClaferModel: [c_value] :: Clafer -> Maybe Value
+ Language.Clafer.IG.ClaferModel: [i_name] :: Id -> String
+ Language.Clafer.IG.ClaferModel: [i_ordinal] :: Id -> Int
+ Language.Clafer.IG.ClaferModel: [v_str] :: Value -> String
+ Language.Clafer.IG.ClaferModel: [v_value] :: Value -> Int
+ Language.Clafer.IG.ClaferModel: instance GHC.Classes.Eq Language.Clafer.IG.ClaferModel.Clafer
+ Language.Clafer.IG.ClaferModel: instance GHC.Classes.Eq Language.Clafer.IG.ClaferModel.Id
+ Language.Clafer.IG.ClaferModel: instance GHC.Classes.Eq Language.Clafer.IG.ClaferModel.Node
+ Language.Clafer.IG.ClaferModel: instance GHC.Classes.Eq Language.Clafer.IG.ClaferModel.Value
+ Language.Clafer.IG.ClaferModel: instance GHC.Classes.Ord Language.Clafer.IG.ClaferModel.Id
+ Language.Clafer.IG.ClaferModel: instance GHC.Classes.Ord Language.Clafer.IG.ClaferModel.Node
+ Language.Clafer.IG.ClaferModel: instance GHC.Show.Show Language.Clafer.IG.ClaferModel.Clafer
+ Language.Clafer.IG.ClaferModel: instance GHC.Show.Show Language.Clafer.IG.ClaferModel.ClaferModel
+ Language.Clafer.IG.ClaferModel: instance GHC.Show.Show Language.Clafer.IG.ClaferModel.FamilyTree
+ Language.Clafer.IG.ClaferModel: instance GHC.Show.Show Language.Clafer.IG.ClaferModel.Id
+ Language.Clafer.IG.ClaferModel: instance GHC.Show.Show Language.Clafer.IG.ClaferModel.Node
+ Language.Clafer.IG.ClaferModel: instance GHC.Show.Show Language.Clafer.IG.ClaferModel.Value
+ Language.Clafer.IG.CommandLine: instance GHC.Show.Show Language.Clafer.IG.CommandLine.AutoComplete
+ Language.Clafer.IG.CommandLineParser: instance GHC.Show.Show Language.Clafer.IG.CommandLineParser.Command
+ Language.Clafer.IG.CommandLineParser: instance GHC.Show.Show Language.Clafer.IG.CommandLineParser.UnsatCoreMinimization
+ Language.Clafer.IG.Constraints: [cardinality] :: ClaferInfo -> Cardinality
+ Language.Clafer.IG.Constraints: [claferInfo] :: Constraint -> ClaferInfo
+ Language.Clafer.IG.Constraints: [constraintInfo] :: Constraint -> ConstraintInfo
+ Language.Clafer.IG.Constraints: [lower] :: Cardinality -> Integer
+ Language.Clafer.IG.Constraints: [pId] :: ConstraintInfo -> String
+ Language.Clafer.IG.Constraints: [pos] :: ConstraintInfo -> Span
+ Language.Clafer.IG.Constraints: [range] :: Constraint -> Span
+ Language.Clafer.IG.Constraints: [syntax] :: ConstraintInfo -> String
+ Language.Clafer.IG.Constraints: [uniqueId] :: ClaferInfo -> String
+ Language.Clafer.IG.Constraints: [upper] :: Cardinality -> Maybe Integer
+ Language.Clafer.IG.Constraints: instance GHC.Classes.Eq Language.Clafer.IG.Constraints.Cardinality
+ Language.Clafer.IG.Constraints: instance GHC.Classes.Eq Language.Clafer.IG.Constraints.ClaferInfo
+ Language.Clafer.IG.Constraints: instance GHC.Classes.Eq Language.Clafer.IG.Constraints.Constraint
+ Language.Clafer.IG.Constraints: instance GHC.Classes.Eq Language.Clafer.IG.Constraints.ConstraintInfo
+ Language.Clafer.IG.Constraints: instance GHC.Show.Show Language.Clafer.IG.Constraints.Cardinality
+ Language.Clafer.IG.Constraints: instance GHC.Show.Show Language.Clafer.IG.Constraints.ClaferInfo
+ Language.Clafer.IG.Constraints: instance GHC.Show.Show Language.Clafer.IG.Constraints.Constraint
+ Language.Clafer.IG.Constraints: instance GHC.Show.Show Language.Clafer.IG.Constraints.ConstraintInfo
+ Language.Clafer.IG.Solution: [a_label] :: Atom -> String
+ Language.Clafer.IG.Solution: [f_id] :: Field -> Int
+ Language.Clafer.IG.Solution: [f_label] :: Field -> String
+ Language.Clafer.IG.Solution: [f_parentId] :: Field -> Int
+ Language.Clafer.IG.Solution: [f_tuples] :: Field -> [Tuple]
+ Language.Clafer.IG.Solution: [s_atoms] :: Sig -> [Atom]
+ Language.Clafer.IG.Solution: [s_fields] :: Solution -> [Field]
+ Language.Clafer.IG.Solution: [s_id] :: Sig -> Int
+ Language.Clafer.IG.Solution: [s_label] :: Sig -> String
+ Language.Clafer.IG.Solution: [s_parentId] :: Sig -> Maybe Int
+ Language.Clafer.IG.Solution: [s_sigs] :: Solution -> [Sig]
+ Language.Clafer.IG.Solution: [t_fromType] :: Tuple -> Int
+ Language.Clafer.IG.Solution: [t_from] :: Tuple -> Atom
+ Language.Clafer.IG.Solution: [t_toType] :: Tuple -> Int
+ Language.Clafer.IG.Solution: [t_to] :: Tuple -> Atom
+ Language.Clafer.IG.Solution: instance GHC.Show.Show Language.Clafer.IG.Solution.Atom
+ Language.Clafer.IG.Solution: instance GHC.Show.Show Language.Clafer.IG.Solution.Field
+ Language.Clafer.IG.Solution: instance GHC.Show.Show Language.Clafer.IG.Solution.Sig
+ Language.Clafer.IG.Solution: instance GHC.Show.Show Language.Clafer.IG.Solution.Solution
+ Language.Clafer.IG.Solution: instance GHC.Show.Show Language.Clafer.IG.Solution.Tuple
+ Language.Clafer.IG.Sugarer: instance GHC.Show.Show Language.Clafer.IG.Sugarer.Census
Files
- CHANGES.md +16/−12
- Makefile +11/−6
- README.md +34/−37
- alloyIG.jar binary
- claferIG.cabal +42/−37
- src-cmd/Main.hs +1/−1
- src/Language/Clafer/IG/ClaferIG.hs +3/−3
- src/Language/Clafer/IG/ClaferModel.hs +2/−2
- tools/Makefile +0/−1
CHANGES.md view
@@ -1,41 +1,45 @@-**ClaferIG Version 0.3.10 released on April 24, 2015** +# ClaferIG Version 0.4.0 released on Jul 28, 2015 +[Release](https://github.com/gsdlab/claferIG/pull/26) + +# ClaferIG Version 0.3.10 released on April 24, 2015 + [Release](https://github.com/gsdlab/claferIG/pull/25) -**ClaferIG Version 0.3.9 released on March 06, 2015** +# ClaferIG Version 0.3.9 released on March 06, 2015 [Release](https://github.com/gsdlab/claferIG/pull/24) -**ClaferIG Version 0.3.8 released on January 27, 2015** +# ClaferIG Version 0.3.8 released on January 27, 2015 [Release](https://github.com/gsdlab/claferIG/pull/23) -**ClaferIG Version 0.3.7 released on October 23, 2014** +# ClaferIG Version 0.3.7 released on October 23, 2014 [Release](https://github.com/gsdlab/claferIG/pull/22) -**ClaferIG Version 0.3.6.1 released on July 08, 2014** +# ClaferIG Version 0.3.6.1 released on July 08, 2014 [Release](https://github.com/gsdlab/claferIG/pull/20) -**ClaferIG Version 0.3.6 released on May 23, 2014** +# ClaferIG Version 0.3.6 released on May 23, 2014 [Release](https://github.com/gsdlab/claferIG/pull/19) -**ClaferIG Version 0.3.5 released on January 20, 2014** +# ClaferIG Version 0.3.5 released on January 20, 2014 [Release](https://github.com/gsdlab/claferIG/pull/17) -**ClaferIG Version 0.3.4 released on September 20, 2013** +# ClaferIG Version 0.3.4 released on September 20, 2013 -**ClaferIG Version 0.3.3 released on August 14, 2013** +# ClaferIG Version 0.3.3 released on August 14, 2013 [Release](https://github.com/gsdlab/claferIG/pull/12) -**ClaferIG Version 0.3.2 released on April 11, 2013** +# ClaferIG Version 0.3.2 released on April 11, 2013 -**ClaferIG Version 0.3.1 released on October 17, 2012** +# ClaferIG Version 0.3.1 released on October 17, 2012 -**ClaferIG Version 0.3 released on July 17, 2012** +# ClaferIG Version 0.3 released on July 17, 2012 This was the first release of Clafer Instance Generator and included all code since the beginning of the project.
Makefile view
@@ -5,6 +5,7 @@ else UNAME := $(shell uname -s) ifeq ($(UNAME), Linux) + MNAME := $(shell uname -m | tr "A-Z" "a-z") ifeq ($(MNAME), i686) LIB := x86-linux/libminisatprover* endif @@ -32,8 +33,8 @@ cp -f alloyIG.jar $(to) cp -f LICENSE $(to)/ cp -f CHANGES.md $(to)/claferIG-CHANGES.md - cp -f README.md $(to)/claferIG-README.mds - cabal install --bindir=$(to) --ghc-option="-O" + cp -f README.md $(to)/claferIG-README.md + cabal install --bindir=$(to) # Removes current build and makes a clean new one (Don't use if starting from scratch!) cleanEnv: @@ -53,7 +54,7 @@ # Build takes less time. For ease of development. build: alloyIG.jar - cabal configure + cabal configure --enable-tests cabal build alloyIG.jar: src/manifest src/org/clafer/ig/AlloyIG.java src/manifest src/org/clafer/ig/Util.java src/org/clafer/ig/AlloyIGException.java src/edu/mit/csail/sdg/alloy4compiler/parser/AlloyCompiler.java @@ -72,9 +73,6 @@ fi test: - # Only test a subset of the suite. The other cases do not work yet. - cabal configure --enable-tests - cabal build # Install what's needed for running the tests cp alloyIG.jar dist/build/test-suite/ cp alloyIG.jar dist/build/claferIG/ @@ -92,3 +90,10 @@ rm -rf tools/amd64-linux rm -rf tools/x86-windows rm -rf tools/x86-mac + +tags: + hasktags --ctags --extendedctag . + +codex: + codex update + mv codex.tags tags
README.md view
@@ -1,22 +1,19 @@-Clafer Instance Generator -========================= +# Clafer Instance Generator -v0.3.10 +v0.4.0 [Clafer](http://clafer.org) is a powerful (equivalent to first-order predicate logic) yet lightweight structural modeling language. Despite simplicity and conciseness of Clafer, writing correct models remains challenging due to hard-to-predict interactions among all constraints expressed in the model. **Clafer instance generator** (ClaferIG) is an interactive tool that generates instances and counter examples of concrete clafers in a Clafer model. If the concrete clafers do not have contradicting constraints, the generator produces valid instance data. Otherwise, the generator produces an unsatisfiable core which included all contradicting constraints and generates a counter example by removing one constraint from the core. The generator can potentially produce many instances if the concrete clafers are not fully specialized. The generator produces different instances on-demand. With these capabilities, the instance generator can be used for debugging models: checking the consistency of the model and detecting under- and overconstraining of the model. The instance generator can also be used programmatically via API (the command line and interactive session interfaces only use the API). For more information, see [technical report](http://gsd.uwaterloo.ca/node/462). -Contributors ------------- +## Contributors -* [Jimmy Liang](http://gsd.uwaterloo.ca/jliang), Main developer. -* [Michał Antkiewicz](http://gsd.uwaterloo.ca/mantkiew), Requirements, development, architecture, testing, technology transfer. +* [Michał Antkiewicz](http://gsd.uwaterloo.ca/mantkiew), Main developer. +* [Jimmy Liang](http://gsd.uwaterloo.ca/jliang), Original developer. * Luke Michael Brown, co-op student May-Aug 2013. Many improvements. -Getting the Clafer Instance Generator -------------------------------------- +## Getting the Clafer Instance Generator Clafer can be installed from a binary distribution (preferred), from Hackage, and from the source code. @@ -24,14 +21,14 @@ Regardless of the installation method, the following are required: -* [Clafer](https://github.com/gsdlab/clafer) v0.3.10 +* [Clafer](https://github.com/gsdlab/clafer) v0.4.0 * [Java Platform (JDK)](http://www.oracle.com/technetwork/java/javase/downloads/index.html) v8+, 64bit - * On Windows, Java must be 32bit because of Alloy + * On Windows, Java must be 32bit because of Alloy, 64bit otherwise * [Alloy4.2](http://alloy.mit.edu/alloy/download.html) ### Installation from binaries -Binary distributions of the release 0.3.10 of Clafer Tools for Windows, Mac, and Linux, +Binary distributions of the release 0.4.0 of Clafer Tools for Windows, Mac, and Linux, can be downloaded from [Clafer Tools - Binary Distributions](http://gsd.uwaterloo.ca/clafer-tools-binary-distributions). 1. download the binaries and unpack `<target directory>` of your choice @@ -41,14 +38,13 @@ Dependencies -* [The Haskell Platform](http://hackage.haskell.org/platform/) v2014.2.0.0 - * Alternatively GHC >= 7.8.3 and Cabal >= 1.18 +* [GHC](https://www.haskell.org/downloads) v7.10.* -ClaferIG is now available on [Hackage](http://hackage.haskell.org/package/claferIG-0.3.10/) and it can be installed using +ClaferIG is now available on [Hackage](http://hackage.haskell.org/package/claferIG-0.4.0/) and it can be installed using 1. `cabal update` 2. `cabal install claferIG` -3. `cd <cabal's lib or share folder>` (`C:\Users\<user>\AppData\Roaming\cabal\i386-windows-ghc-7.8.3\claferIG-0.3.10` on Windows or `.cabal/share/x86_64-linux-ghc-7.8.3/claferIG-0.3.10/` on Linux) +3. `cd <cabal's lib or share folder>` (`C:\Users\<user>\AppData\Roaming\cabal\i386-windows-ghc-7.10.1\claferIG-0.4.0` on Windows or `.cabal/share/x86_64-linux-ghc-7.10.1/claferIG-0.4.0/` on Linux) 3. to automatically download Alloy4.2 jar * execute `make` in `tools` 4. To get the `minisatproover` library @@ -62,8 +58,7 @@ Dependencies -* [The Haskell Platform](http://hackage.haskell.org/platform/) v2014.2.0.0 - * Alternatively GHC >= 7.8.3 and Cabal >= 1.18 +* [GHC](https://www.haskell.org/downloads) v7.10.* * [Clafer compiler](https://github.com/gsdlab/clafer) (to produce Alloy models (`.als`)). The version number of the compiler must match the version of the instance generator. * On Linux, might need to manually install `zlib1g-dev` and `libncurses5-dev` to build one of Haskell packages on which ClaferIG depends * on Ubuntu, execute `sudo apt-get install zlib1g-dev libncurses5-dev` @@ -101,14 +96,14 @@ > On Windows, use `/` with the `make` command instead of `\`. -Integration with Sublime Text 2/3 -------------------------------- +## Integration with Sublime Text 2/3 + See [ClaferToolsST](https://github.com/gsdlab/ClaferToolsST) -Integration with VIM --------------------- +## Integration with VIM + See [clafer-vim](https://github.com/wasowski/clafer-vim) Usage @@ -121,7 +116,7 @@ (As printed by `claferIG --help`) ``` -ClaferIG v0.3.10 +ClaferIG v0.4.0 claferIG [OPTIONS] [FILE] @@ -145,7 +140,7 @@ -j --json Render solution as JSON (forces 'addUids'). -i --flatten-inheritance-comp Flatten inheritance during - compiling ('alloy' and 'alloy42' + compiling ('alloy' and 'Alloy' modes only) -l --no-layout-comp Don't resolve off-side rule layout during compiling @@ -171,11 +166,11 @@ ### Interactive Session Usage In the interactive mode, the users can invoke the following commands by pressing a letter marked in the command name between '' or the whole command as marked by '': -``` ------------------- -| ClaferIG 0.3.10 | ------------------- +## ``` +## | ClaferIG 0.4.0 | + + You can invoke the following commands as indicated by single quotes: [tab] - print the available commands - auto-complete command name, a clafer name, or clafer instance name in a given context @@ -211,11 +206,12 @@ ``` -Output format -------------- +## Output format -### Instance data +There are two output formats: native (plain text, default) and JSON (`--json`). +### Instance data (native) + The instance data notation is very similar to a regular Clafer notation for concrete clafers with a few differences: * no constraints @@ -306,9 +302,9 @@ Here, `C1` and `C3` are satisfied but `C2` is not. To resolve the conflict and assuming that the counter example is actually a correct instance data, the user has to modify the model by removing `C2`. However, should the counter example actually represent incorrect instance data, the user can remove `C3` to resolve the inconsistency. -Troubleshooting ---------------- +## Troubleshooting + If you get an error: ``` @@ -323,9 +319,9 @@ On Windows, Alloy only supports Minisat with UnSAT core on 32bit Java. There's nothing we can do. -How it works ------------- +## How it works + The Clafer instance generator: * translates the input Clafer model (.cfr) to an Alloy4.2 model (.als). The compiler's intermediate representation (IR) contains the mapping between Clafer names and Alloy names. The IR also contains the scopes for each Alloy signature to ensure that a valid instance can be found if it exists @@ -334,7 +330,8 @@ * translates the instance or the counterexample data produced by Alloy Analyzer to Clafer instance data format using the name map from IR in a reverse direction, * for a counterexample, translates the counter example in Alloy to Claefr instance data and constraint violations in Alloy into constraint violations in Clafer model -Need help? -========== +# Need help? + + * Visit [language's website](http://clafer.org). * Report issues to [issue tracker](https://github.com/gsdlab/claferIG/issues)
alloyIG.jar view
binary file changed (22370 → 22370 bytes)
claferIG.cabal view
@@ -1,5 +1,5 @@ Name: claferIG -Version: 0.3.10 +Version: 0.4.0 Synopsis: claferIG is an interactive tool that generates instances of Clafer models. Description: Clafer is a powerful (equivalent to first-order predicate logic) yet lightweight structural modeling language. Despite simplicity and conciseness of Clafer, writing correct models remains challenging due to hard-to-predict interactions among all constraints expressed in the model. Clafer instance generator (ClaferIG) is an interactive tool that generates instances and counter examples of concrete clafers in a Clafer model. If the concrete clafers do not have contradicting constraints, the generator produces valid instance data. Otherwise, the generator produces an unsatisfiable core which included all contradicting constraints and generates a counter example by removing one constraint from the core. The generator can potentially produce many instances if the concrete clafers are not fully specialized. The generator produces different instances on-demand. With these capabilities, the instance generator can be used for debugging models: checking the consistency of the model and detecting under- and overconstraining of the model. The instance generator can also be used programmatically via API (the command line and interactive session interfaces only use the API). Homepage: https://github.com/gsdlab/claferIG @@ -21,49 +21,54 @@ type: git location: git://github.com/gsdlab/claferIG.git Executable claferIG - build-tools: ghc >= 7.8.3 + build-tools: ghc >= 7.10.1 default-language: Haskell2010 Main-is: Main.hs - Build-depends: base >= 4.7.0.1 && < 5 - , containers >= 0.5.5.1 - , directory >= 1.2.1.0 - , filepath >= 1.3.0.2 - , transformers >= 0.3.0.0 + Build-depends: base >= 4.8.0.0 && < 5 + , containers >= 0.5.6.2 + , directory >= 1.2.2.0 + , filepath >= 1.4.0.0 + , transformers >= 0.4.2.0 - , mtl >= 2.1.3.1 + , mtl >= 2.2.1 - , cmdargs >= 0.10.7 + , cmdargs >= 0.10.13 , executable-path >= 0.0.3 - , haskeline >= 0.7.1.2 + , haskeline >= 0.7.2.1 - , clafer == 0.3.10 - , claferIG == 0.3.10 + , clafer == 0.4.0 + , claferIG == 0.4.0 other-modules: Paths_claferIG Hs-Source-Dirs: src-cmd ghc-options: -Wall -fno-warn-orphans library - build-tools: ghc >= 7.8.3 + build-tools: ghc >= 7.10.1 default-language: Haskell2010 - build-depends: array >= 0.5.0 - , base >= 4.7.0.1 && < 5 - , containers >= 0.5.5.1 - , directory >= 1.2.1.0 - , filepath >= 1.3.0.2 - , process >= 1.2.0.0 - , transformers >= 0.3.0.0 + build-depends: array >= 0.5.1.0 + , base >= 4.8.0.0 && < 5 + , containers >= 0.5.6.2 + , directory >= 1.2.2.0 + , filepath >= 1.4.0.0 + , process >= 1.2.3.0 + , transformers >= 0.4.2.0 - , mtl >= 2.1.3.1 - , parsec >= 3.1.5 + , mtl >= 2.2.1 + , parsec >= 3.1.9 , data-stringmap >= 1.0.1.1 , executable-path >= 0.0.3 - , haskeline >= 0.7.1.2 - , HaXml >= 1.24 + , haskeline >= 0.7.2.1 , json-builder >= 0.3 - , string-conversions >= 0.3.0.2 + , string-conversions >= 0.4 - , clafer == 0.3.10 + , clafer == 0.4.0 + + if os(windows) + build-depends: HaXml == 1.24 + else + build-depends: HaXml >= 1.25.3 + hs-source-dirs: src ghc-options: -Wall -fno-warn-orphans exposed-modules: Language.Clafer.IG.AlloyIGInterface @@ -82,20 +87,20 @@ default-language: Haskell2010 main-is: test-suite.hs hs-source-dirs: test - build-depends: array >= 0.5.0 - , base >= 4.7.0.1 && < 5 - , directory >= 1.2.1.0 - , filepath >= 1.3.0.2 - , transformers >= 0.3.0.0 + build-depends: array >= 0.5.1.0 + , base >= 4.8.0.0 && < 5 + , directory >= 1.2.2.0 + , filepath >= 1.4.0.0 + , transformers >= 0.4.2.0 , HUnit >= 1.2.5.2 - , cmdargs >= 0.10.7 - , tasty >= 0.10 - , tasty-hunit >= 0.9 - , tasty-th >= 0.1.2 + , cmdargs >= 0.10.13 + , tasty >= 0.10.1.2 + , tasty-hunit >= 0.9.2 + , tasty-th >= 0.1.3 - , clafer == 0.3.10 - , claferIG == 0.3.10 + , clafer == 0.4.0 + , claferIG == 0.4.0 other-modules: Paths_claferIG ghc-options: -Wall -fno-warn-orphans
src-cmd/Main.hs view
@@ -56,7 +56,7 @@ useUids = False &= help "Use unique clafer names in the Clafer solution.", addTypes = False &= help "Add colon/reference types to the Clafer solution.", json = False &= help "Render solution as JSON (forces 'addUids').", - flatten_inheritance_comp = def &= help "Flatten inheritance during compiling ('alloy' and 'alloy42' modes only)" &= name "i", + flatten_inheritance_comp = def &= help "Flatten inheritance during compiling ('alloy' mode only)" &= name "i", no_layout_comp = def &= help "Don't resolve off-side rule layout during compiling" &= name "l", check_duplicates_comp = def &= help "Check duplicated clafer names during compiling" &= name "c", skip_resolver_comp = def &= help "Skip name resolution during compiling" &= name "f",
src/Language/Clafer/IG/ClaferIG.hs view
@@ -85,7 +85,7 @@ import System.Console.Haskeline.MonadException import Paths_claferIG (version) import Data.Version (showVersion) -import Prelude +import Prelude claferIGVersion :: String claferIGVersion = "ClaferIG " ++ showVersion Paths_claferIG.version @@ -214,11 +214,11 @@ iModule <- desugar Nothing compile iModule results <- generate - let (Just alloyResult) = Map.lookup Alloy42 results + let (Just alloyResult) = Map.lookup Alloy results return (claferEnv alloyResult, outputCode alloyResult, mappingToAlloy alloyResult, stringMap alloyResult) mapLeft f (Left l) = Left $ f l mapLeft _ (Right r) = Right r - claferArgs = defaultClaferArgs{mode = [Alloy42], keep_unused = True, no_stats = True, skip_goals = True ,flatten_inheritance = flatten_inheritance_comp igArgs, no_layout = no_layout_comp igArgs, check_duplicates = check_duplicates_comp igArgs, skip_resolver = skip_resolver_comp igArgs, scope_strategy = scope_strategy_comp igArgs} + claferArgs = defaultClaferArgs{mode = [Alloy], keep_unused = True, no_stats = True,flatten_inheritance = flatten_inheritance_comp igArgs, no_layout = no_layout_comp igArgs, check_duplicates = check_duplicates_comp igArgs, skip_resolver = skip_resolver_comp igArgs, scope_strategy = scope_strategy_comp igArgs} claferFile' = claferModelFile igArgs bitwidth' = bitwidth igArgs
src/Language/Clafer/IG/ClaferModel.hs view
@@ -152,7 +152,7 @@ buildTuple _ Tuple{t_from = from, t_to = to, t_toType = toType} tree' = addChild (labelAsId $ a_label from) (buildNode (labelAsId $ a_label to) toType) tree' where - buildNode = if label == "ref" then ValueNode else ClaferNode + buildNode = if "_ref" `isSuffixOf` label then ValueNode else ClaferNode labelAsId :: String -> Id labelAsId label = @@ -188,7 +188,7 @@ buildClafer :: Node -> Either Clafer Value buildClafer (ClaferNode id _) = - Left $ Clafer id (singleton valueChildren) claferChildren + Left $ Clafer id (singleton $ nub valueChildren) claferChildren where (claferChildren, valueChildren) = partitionEithers $ map buildClafer children children = getChildren id ftree
tools/Makefile view
@@ -1,5 +1,4 @@ WGET_COMMAND := wget -MNAME := $(shell uname -m | tr "A-Z" "a-z") ifneq ($(OS),Windows_NT) UNAME := $(shell uname -s)