Skip to content

Commit

Permalink
prototype(ldfi v2): add the first conjunction of ldfi
Browse files Browse the repository at this point in the history
  • Loading branch information
symbiont-stevan-andjelkovic committed Feb 9, 2021
1 parent dd421f6 commit 07bdeed
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/ldfi2/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,18 @@ data Formula
| Neg Formula
| TT
| FF
| Var String
deriving Show

intersections :: (Foldable f, Ord a) => f (Set a) -> Set a
intersections = foldl1 Set.intersection

ldfi :: [Trace] -> Formula
ldfi [] = FF
ldfi ts =
let
ns = map nodes ts
in
And (map Var (Set.toList (intersections ns)))

main :: IO ()
main = return ()

0 comments on commit 07bdeed

Please sign in to comment.