Class IRAWrapperFactory
java.lang.Object
de.uni_freiburg.informatik.ultimate.logic.IRAWrapperFactory
public class IRAWrapperFactory
extends java.lang.Object
Factory for creating wrapper functions that handle the IRA syntactic sugar rules. The SMTLIB standard permits to call
a function with two Real arguments with a mixture of Int and Real. This is syntactic sugar for casting the Int
parameters to Real using the to_real function. This factory creates wrapper function symbols with the correct mixture
of Int and Real arguments. These are defined functions and their function definition calls the original function
symbol with the correct to_real casts.
- Author:
- Jochen Hoenicke
-
Constructor Summary
Constructors Constructor Description IRAWrapperFactory() -
Method Summary
Modifier and Type Method Description FunctionSymbolcreateWrapper(de.uni_freiburg.informatik.ultimate.logic.Theory theory, java.lang.String name, java.lang.String[] indices, Sort[] paramSorts, Sort resultType)Create an IRA wrapper function for name for the given parameter sorts.
-
Constructor Details
-
IRAWrapperFactory
public IRAWrapperFactory()
-
-
Method Details
-
createWrapper
public FunctionSymbol createWrapper(de.uni_freiburg.informatik.ultimate.logic.Theory theory, java.lang.String name, java.lang.String[] indices, Sort[] paramSorts, Sort resultType)Create an IRA wrapper function for name for the given parameter sorts. This is a new function symbol whose definition casts all integer parameters to real parameters using theto_realfunction. If the parameter count does not match, or if not all parameters are real or integer this returns null. For associative functions this creates a wrapper for every used sequence of sorts. E.g., it may create the function(define-fun + ((Real a) (Int b) (Real c)) (+ a (to_real b) c)).- Parameters:
theory- the underlying theory.name- the unwrapped function symbol. It is assumed that it takes two real parameters except for "ite".indices- optional indices, null for no indices.paramSorts- the parameter sorts for the wrapper function.resultType- the result type specified by SMTLIB(as ..); null if no result type specified.- Returns:
- null if an error occured, otherwise the wrapping function symbol.
-