Currently job artifacts in CI/CD pipelines on LRZ GitLab never expire. Starting from Wed 26.1.2022 the default expiration time will be 30 days (GitLab default). Currently existing artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit a4645dde authored by Philipp Meyer's avatar Philipp Meyer
Browse files

Added output of input file in main

parent c4a94af6
......@@ -3,12 +3,22 @@ module Main where
import System.Environment (getArgs)
import Parser (parseFile)
import PetriNet
import Property
checkProperty :: PetriNet -> Property -> Bool
checkProperty net p = True
main :: IO ()
main = do
args <- getArgs
putStrLn "Safety and Liveness Analysis of Petri Nets with SMT solvers"
let file = head args
net <- parseFile file
print net
putStrLn "Safety and Liveness Analysis of Petri Nets with SMT solvers"
putStrLn $ "Reading \"" ++ file ++ "\""
(net,properties) <- parseFile file
putStrLn $ "Analyzing " ++ show net
mapM_ (\p -> do
putStrLn $ "Checking " ++ show p
putStrLn $ show $ checkProperty net p
) properties
......@@ -14,10 +14,11 @@ data PetriNet = PetriNet {
}
instance Show PetriNet where
show net = "Petri net " ++ name net ++ "\n" ++
"Places: " ++ unwords (places net) ++ "\n" ++
"Transitions: " ++ unwords (transitions net) ++ "\n" ++
"Arcs:\n" ++ unlines
show net = "Petri net" ++
(if null (name net) then "" else " " ++ show (name net)) ++
"\nPlaces: " ++ unwords (places net) ++
"\nTransitions: " ++ unwords (transitions net) ++
"\nArcs:\n" ++ unlines
(map (\(l,r,w) -> l ++ " ->" ++
(if w /= 1 then "[" ++ show w ++ "]" else []) ++
" " ++ r)
......
......@@ -29,9 +29,9 @@ data Op = Gt | Ge | Eq | Le | Lt
instance Show Op where
show Gt = ">"
show Ge = ">="
show Ge = ""
show Eq = "="
show Le = "<="
show Le = ""
show Lt = "<"
data LinearInequation = LinIneq Term Op Term
......@@ -62,6 +62,8 @@ instance Show PropertyType where
data Property = Property String PropertyType Formula
instance Show Property where
show (Property name ptype formula) = show ptype ++ " " ++ show name ++
" { " ++ show formula ++ " }"
show (Property name ptype formula) =
show ptype ++ " property " ++
(if null name then "" else show name ++ " ") ++
"{ " ++ show formula ++ " }"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment