java.lang.Object
dev.civl.sarl.prove.IF.Prove
This is the entry point for module prove. It provides:
- constants of type
ValidityResultcorresponding to the three different kinds of validity results:RESULT_YES,RESULT_NO, andRESULT_MAYBE - methods for producing new
TheoremProverFactoryinstances. - various other methods dealing with prover results
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ValidityResultA constant of typeValidityResultwhich hasValidityResult.ResultType.invalid reference
ResultType.MAYBEstatic final ValidityResultA constant of typeValidityResultwhich hasValidityResult.ResultType.invalid reference
ResultType.NOstatic final ValidityResultA constant of typeValidityResultwhich hasValidityResult.ResultType.invalid reference
ResultType.YES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ModelResultConstructs a newModelResultwrapping the given mapping from symbolic constants to symbolic expressions.static TheoremProverFactorynewMultiProverFactory(PreUniverse universe, SARLConfig config, Path workingDirectory) Constructs a new theorem prover factory based on the given configuration.static TheoremProverFactorynewProverFactory(PreUniverse universe, ProverInfo prover, Path workingDirectory) Constructs a new theorem prover factory based on a single underlying theorem prover.static TheoremProverFactorystatic ValidityResult
-
Field Details
-
RESULT_YES
A constant of typeValidityResultwhich hasValidityResult.ResultType.invalid reference
ResultType.YES -
RESULT_NO
A constant of typeValidityResultwhich hasValidityResult.ResultType.invalid reference
ResultType.NO -
RESULT_MAYBE
A constant of typeValidityResultwhich hasValidityResult.ResultType.invalid reference
ResultType.MAYBE
-
-
Constructor Details
-
Prove
public Prove()
-
-
Method Details
-
newMultiProverFactory
public static TheoremProverFactory newMultiProverFactory(PreUniverse universe, SARLConfig config, Path workingDirectory) Constructs a new theorem prover factory based on the given configuration. A resulting prover resolves a query as follows: it starts by using the first external prover in the given config. If that result is inconclusive, it goes to the next, and so on.- Parameters:
universe- the symbolic universe used to manage and produce symbolic expressionsconfig- a SARL configuration object specifying some sequence of theorem provers which are available- Returns:
- a new theorem prover factory which may use all of the provers specified in the config, in order, until a conclusive result is reached or all provers have been exhausted
-
newProverFactory
public static TheoremProverFactory newProverFactory(PreUniverse universe, ProverInfo prover, Path workingDirectory) Constructs a new theorem prover factory based on a single underlying theorem prover.- Parameters:
universe- the symbolic universe used to produce and manipulate symbolic expressionsprover- aProverInfoobject providing information on the specific underlying theorem prover which will be used- Returns:
- the new theorem prover factory based on the given prover
-
trivialProverFactory
-
validityResult
- Parameters:
type- a non-nullValidityResult.ResultType- Returns:
- either
RESULT_YES,RESULT_NO, orRESULT_MAYBE, depending on whethertypeisValidityResult.ResultType.YES,ValidityResult.ResultType.NO, orValidityResult.ResultType.MAYBE, respectively.
-
modelResult
Constructs a newModelResultwrapping the given mapping from symbolic constants to symbolic expressions. The represents the case where a validity result isValidityResult.ResultType.NOand, in addition, a specific counter example has been found. The counterexample specifies a concrete value for each symbolic constant which was used in the query, in such a way that the queried predicate evaluates tofalseand the queried assumption evaluates totrue.- Parameters:
model- mapping giving concrete value to each symbolic constant occurring in the query- Returns:
- new instance of
ModelResultwrapping the givenmode.
-