This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qualified Data.Map as M | |
type State = String | |
type Symbol = (String, Int) | |
data TreeAutomaton = TreeAutomaton | |
{ symbols :: [Symbol] | |
, states :: [State] | |
, finalStates :: [State] | |
, delta :: M.Map (Symbol, [State]) State |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import System.Environment (getArgs) | |
import Control.Monad (unless) | |
import Data.SBV | |
testInt :: Int -> Predicate | |
testInt n = do | |
vars <- mkExistVars n | |
let s = sum vars | |
return $ s .>= (1::SInteger) &&& s .<= 5 &&& s ./= 3 |