qute

A software analysis framework built around the QBE intermediate language

git clone https://git.8pit.net/qute.git

 1-- SPDX-FileCopyrightText: 2025-2026 Sören Tempel <soeren+git@soeren-tempel.net>
 2--
 3-- SPDX-License-Identifier: GPL-3.0-only
 4
 5module Main (main) where
 6
 7import BV (bvTests)
 8import Backend (backendTests)
 9import Concolic qualified as CE
10import Control.Exception (IOException, try)
11import Data.Either (isLeft)
12import Explorer (exploreTests)
13import Golden (goldenTests)
14import Language.QBE.Simulator.Explorer (defSolver)
15import SimpleBV qualified as SMT
16import Symbolic qualified as SE
17import System.IO (hPutStrLn, stderr)
18import Test.Tasty
19
20main :: IO ()
21main = do
22  solver <- try defSolver :: IO (Either IOException SMT.Solver)
23  if isLeft solver
24    then hPutStrLn stderr "WARNING: No solver found, skipping tests!"
25    else defaultMain tests
26
27tests :: TestTree
28tests =
29  testGroup
30    "Tests"
31    [ SE.exprTests,
32      CE.exprTests,
33      backendTests,
34      exploreTests,
35      goldenTests,
36      bvTests
37    ]