99package org .sosy_lab .java_smt .api ;
1010
1111import com .google .common .collect .ImmutableMap ;
12+ import org .sosy_lab .common .ShutdownNotifier ;
1213import org .sosy_lab .java_smt .SolverContextFactory .Solvers ;
1314
1415/**
@@ -65,6 +66,28 @@ enum ProverOptions {
6566 */
6667 ProverEnvironment newProverEnvironment (ProverOptions ... options );
6768
69+ /**
70+ * Create a fresh new {@link ProverEnvironment} which encapsulates an assertion stack and can be
71+ * used to check formulas for unsatisfiability. Allows the shutdown of the prover instance
72+ * returned with the given {@link ShutdownNotifier}, without stopping other provers of the context
73+ * calling this (except for provers also connected via the given {@link ShutdownNotifier}).
74+ *
75+ * @param pProverShutdownNotifier a {@link ShutdownNotifier} that stops the prover returned by
76+ * this method. The prover is not usable anymore after a shutdown has been requested and only
77+ * ever returns {@link InterruptedException}s. The context can be used normally and new
78+ * provers can be created and used. If a {@link ShutdownNotifier} has been given to the
79+ * context that is used to call this method, both notifiers can be used to stop the prover
80+ * returned by this method. Note that once a shutdown-request has been given to the contexts
81+ * {@link ShutdownNotifier}, no prover can ever be used again on that context instance.
82+ * Solvers that don't support isolated prover shutdown throw a {@link
83+ * UnsupportedOperationException} for this method and {@link
84+ * #newProverEnvironment(ProverOptions...)} should be used instead.
85+ * @param options Options specified for the prover environment. All the options specified in
86+ * {@link ProverOptions} are turned off by default.
87+ */
88+ ProverEnvironment newProverEnvironment (
89+ ShutdownNotifier pProverShutdownNotifier , ProverOptions ... options );
90+
6891 /**
6992 * Create a fresh new {@link InterpolatingProverEnvironment} which encapsulates an assertion stack
7093 * and allows generating and retrieve interpolants for unsatisfiable formulas. If the SMT solver
@@ -76,6 +99,31 @@ enum ProverOptions {
7699 */
77100 InterpolatingProverEnvironment <?> newProverEnvironmentWithInterpolation (ProverOptions ... options );
78101
102+ /**
103+ * Create a fresh new {@link InterpolatingProverEnvironment} which encapsulates an assertion stack
104+ * and allows generating and retrieve interpolants for unsatisfiable formulas. If the SMT solver
105+ * is able to handle satisfiability tests with assumptions please consider implementing the {@link
106+ * InterpolatingProverEnvironment} interface, and return an Object of this type here. Allows the
107+ * shutdown of the prover instance returned with the given {@link ShutdownNotifier}, without
108+ * stopping other provers of the context calling this (except for provers also connected via the
109+ * given {@link ShutdownNotifier}).
110+ *
111+ * @param pProverShutdownNotifier a {@link ShutdownNotifier} that stops the prover returned by
112+ * this method. The prover is not usable anymore after a shutdown has been requested and only
113+ * ever returns {@link InterruptedException}s. The context can be used normally and new
114+ * provers can be created and used. If a {@link ShutdownNotifier} has been given to the
115+ * context that is used to call this method, both notifiers can be used to stop the prover
116+ * returned by this method. Note that once a shutdown-request has been given to the contexts
117+ * {@link ShutdownNotifier}, no prover can ever be used again on that context instance.
118+ * Solvers that don't support isolated prover shutdown throw a {@link
119+ * UnsupportedOperationException} for this method and {@link
120+ * #newProverEnvironment(ProverOptions...)} should be used instead.
121+ * @param options Options specified for the prover environment. All the options specified in
122+ * {@link ProverOptions} are turned off by default.
123+ */
124+ InterpolatingProverEnvironment <?> newProverEnvironmentWithInterpolation (
125+ ShutdownNotifier pProverShutdownNotifier , ProverOptions ... options );
126+
79127 /**
80128 * Create a fresh new {@link OptimizationProverEnvironment} which encapsulates an assertion stack
81129 * and allows solving optimization queries.
@@ -85,6 +133,28 @@ enum ProverOptions {
85133 */
86134 OptimizationProverEnvironment newOptimizationProverEnvironment (ProverOptions ... options );
87135
136+ /**
137+ * Create a fresh new {@link OptimizationProverEnvironment} which encapsulates an assertion stack
138+ * and allows solving optimization queries. Allows the shutdown of the prover instance returned
139+ * with the given {@link ShutdownNotifier}, without stopping other provers of the context calling
140+ * this (except for provers also connected via the given {@link ShutdownNotifier}).
141+ *
142+ * @param pProverShutdownNotifier a {@link ShutdownNotifier} that stops the prover returned by
143+ * this method. The prover is not usable anymore after a shutdown has been requested and only
144+ * ever returns {@link InterruptedException}s. The context can be used normally and new
145+ * provers can be created and used. If a {@link ShutdownNotifier} has been given to the
146+ * context that is used to call this method, both notifiers can be used to stop the prover
147+ * returned by this method. Note that once a shutdown-request has been given to the contexts
148+ * {@link ShutdownNotifier}, no prover can ever be used again on that context instance.
149+ * Solvers that don't support isolated prover shutdown throw a {@link
150+ * UnsupportedOperationException} for this method and {@link
151+ * #newProverEnvironment(ProverOptions...)} should be used instead.
152+ * @param options Options specified for the prover environment. All the options specified in
153+ * {@link ProverOptions} are turned off by default.
154+ */
155+ OptimizationProverEnvironment newOptimizationProverEnvironment (
156+ ShutdownNotifier pProverShutdownNotifier , ProverOptions ... options );
157+
88158 /**
89159 * Get version information out of the solver.
90160 *
0 commit comments