
org.sosy_lab.java_smt.api.UFManager Maven / Gradle / Ivy
Show all versions of java-smt Show documentation
// This file is part of JavaSMT,
// an API wrapper for a collection of SMT solvers:
// https://github.com/sosy-lab/java-smt
//
// SPDX-FileCopyrightText: 2020 Dirk Beyer
//
// SPDX-License-Identifier: Apache-2.0
package org.sosy_lab.java_smt.api;
import java.util.List;
/** Manager for dealing with uninterpreted functions (UFs). */
public interface UFManager {
/** Declare an uninterpreted function. */
FunctionDeclaration declareUF(
String name, FormulaType returnType, List> args);
/** Declare an uninterpreted function. */
FunctionDeclaration declareUF(
String name, FormulaType returnType, FormulaType>... args);
/**
* Create an uninterpreted function call.
*
* Simply delegates to {@link FormulaManager#makeApplication(FunctionDeclaration, List)}
*
* @param funcType Declaration of the function to call.
* @param args Arguments of the function.
* @return Instantiated function call.
*/
T callUF(FunctionDeclaration funcType, List extends Formula> args);
/**
* @see #callUF(FunctionDeclaration, List)
*/
T callUF(FunctionDeclaration funcType, Formula... args);
/**
* Declares and calls an uninterpreted function with exactly the given name.
*
* Please make sure that the given name is valid in SMT-LIB2. Take a look at {@link
* FormulaManager#isValidName} for further information.
*
*
This method does not quote or unquote the given name, but uses the plain name "AS IS".
* {@link Formula#toString} can return a different String than the given one.
*/
T declareAndCallUF(
String name, FormulaType pReturnType, List pArgs);
/**
* @see #declareAndCallUF(String, FormulaType, List)
*/
T declareAndCallUF(String name, FormulaType pReturnType, Formula... pArgs);
}