CurryInfo: verify-non-fail-2.0.0 / Verify.WithSMT.fun2SMT

definition: Info
 
fun2SMT :: FuncDecl -> Maybe ([Ident],FunSig,Term)
fun2SMT (Func qn _ _ texp rule) = do
  let fsig = FunSig (transOpName qn)
                    (map type2sort (argTypes texp))
                    (type2sort (resultType texp))
  srule <- rule2SMT rule
  let tpars = union (typeParamsOfFunSig fsig) (typeParamsOfTerm srule)
  return (tpars, fsig, srule)
 where
  rule2SMT (External s) = return $
    tEqu (tComb (transOpName qn) []) (tComb ("External:" ++ s) [])
  rule2SMT (Rule vs exp) = do
    let isnd = ndExpr exp
        lhs  = tComb (transOpName qn) (map TSVar vs)
    (rhs,varsorts) <- exp2SMTWithVars (maximum (0:vs))
                                      (if isnd then Just lhs else Nothing)
                                      (simpExpr exp)
    return $
      Forall (map (\ (v,t) -> SV v (type2sort t))
                  (funcType2TypedVars vs texp))
             (Exists (map (\ (v,s) -> SV v s) varsorts)
                     (if isnd then rhs else tEqu lhs rhs))
demand: Info
 argument 1
deterministic: Info
 deterministic operation
documentation: Info
 
------------------------------------------------------------------------
Translates a function declaration into a (possibly polymorphic)
SMT function declaration.
failfree: Info
 <FAILING>
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {({Func}) |-> _}
name: Info
 fun2SMT
precedence: Info
 no precedence defined
result-values: Info
 _
signature: Info
 FlatCurry.Types.FuncDecl
-> Prelude.Maybe ([String], Verify.ESMT.FunSig, Verify.ESMT.Term)
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 possibly non-terminating
totally-defined: Info
 possibly non-reducible on same data term