2.12.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 2542d046 by Philipp Meyer

### Added option to simplify formulas used for invariants

parent 1371c6be
 ... ... @@ -275,14 +275,25 @@ checkLivenessProperty net f = do case r of (Nothing, cuts) -> do invariant <- opt optInvariant if invariant then do r' <- checkSat \$ checkLivenessInvariantSat net f cuts printInvariant r' if invariant then getLivenessInvariant net f cuts >>= printInvariant else return Satisfied (Just _, _) -> return Unknown getLivenessInvariant :: PetriNet -> Formula Transition -> [Cut] -> OptIO (Maybe [LivenessInvariant]) getLivenessInvariant net f cuts = do verbosePut 2 \$ "Number of cuts: " ++ show (length cuts) simp <- opt optSimpFormula let dnfCuts = generateCuts f cuts verbosePut 2 \$ "Number of disjuncts: " ++ show (length dnfCuts) let simpCuts = if simp then simplifyCuts dnfCuts else dnfCuts verbosePut 2 \$ "Number of simplified disjuncts: " ++ show (length simpCuts) rs <- mapM (checkSat . checkLivenessInvariantSat net) simpCuts let added = map (Just . cutToLivenessInvariant) cuts return \$ sequence (rs ++ added) checkLivenessProperty' :: PetriNet -> Formula Transition -> [Cut] -> OptIO (Maybe FiringVector, [Cut]) checkLivenessProperty' net f cuts = do ... ...
 ... ... @@ -43,6 +43,7 @@ data Options = Options { inputFormat :: InputFormat , optProperties :: [ImplicitProperty] , optTransformations :: [NetTransformation] , optRefine :: Bool , optSimpFormula :: Bool , optRefinementType :: RefinementType , optInvariant :: Bool , optOutput :: Maybe String ... ... @@ -59,6 +60,7 @@ startOptions = Options { inputFormat = PNET , optProperties = [] , optTransformations = [] , optRefine = True , optSimpFormula = True , optRefinementType = SComponentRefinement , optInvariant = False , optOutput = Nothing ... ... @@ -216,6 +218,12 @@ options = })) "Do not use the properties given in the input file" , Option "" ["no-simp"] (NoArg (\opt -> Right opt { optSimpFormula = False })) "Do not simplify formula for invariant generation" , Option "v" ["verbose"] (NoArg (\opt -> Right opt { optVerbosity = optVerbosity opt + 1 })) "Increase verbosity (may be specified more than once)" ... ...