Description:
add_artificial_transition(+SrcId,+Operation,+DstState,+DstId,-TransitionTuple)
creates a helper transition that is artificially added to the state space (e.g. during deadlock checking)
This transition is added to the state space.
A triple TransitionTuple in the form op(TransId,OpName,SrcId,DstId) for this transition is generated.
Description:
We want to catch all possiblities, we do not care for an failing option
Description:
build_modelcheck_return(+MCRes, -JavaResult)
Description:
cbc_disprove(+Goal,+AllHypotheses,+SelectedHypotheses,+TimeoutFactor,-OutResult)
#### called by:
ProB Plugin (de.prob.eventb.disprover.core): DisproverCommand
Description:
cbc_disprove(+Goal,+AllHypotheses,+SelectedHypotheses,+TimeoutFactor,-OutResult)
the same with explicit Options:
Description:
cbc_solve_with_opts(+Solver,+Options,+Predicate,-Identifiers,-Result)
Description:
check_csp_assertions(+Assertions,-Results,-ResultTraces)
Takes a list of assertions and produce a list of results and result traces.
TODO: We should modify the result traces so that they are useful for ProB 2.0. (or at least document what the result traces mean)
#### called by:
ProB 2.0: CSPAssertionsCommand
Description:
compute_coverage(-TotalNodeNr,-TotalTransSum,-NodeStat,-OpStat,-Uncovered)
Description:
compute_efficient_statespace_stats(-NrNodes, -NrTrans, -NrProcessed)
Computes the coverage statistics of the current state space at any given time.
The information of interest includes the total number of nodes and transitions, as well as
a list of statistics about the nodes and operations and a list of the operations that have been uncovered sofar.
#### called by:
ProB Plugin: ComputeCoverageCommand
* ProB 2.0: ComputeCoverageCommand
Description:
compute_operations_for_state(+StateID,-Transitions)
Compute the enabled operations (without the backtrack options) for a given state id.
Transitions is a list of operation tuples with the form op(TransitionId, Name,SrcId,DestId)
#### called by:
ProB 2.0: GetEnabledOperationsCommand
Description:
create_op_tuple(+OpTerm, +PPOpts, -Params, -RetVals)
Creates an operation tuple from transition id, source id, an op term, and a destination id.
If creation is unsuccessful, an error is added and the predicate fails.
See comment for extract_op_tuple for a description of OpTuple
Description:
deserialize(-NewId,+SerializedState)
Deserialize a state and add it if necessary
#### called by:
ProB 2.0: DeserializeStateCommand
Description:
do_modelchecking(+MaxNumberOfStatesToCheck,+Time,+Options,-Result,-Stats)
#### do_modelchecking(+MaxNumberOfStatesToCheck, +Time,+Options,-Result,stats(-NrNodes,-NrTrans,-NrProcessed))
+MaxNumberOfStatesToCheck : maximum number of states to be checked
* +Time : Timeout specified by the user in ms
* +Options : List of options specified by the user. Used for predicate do_modelchecking(Time,Options,Result)
* -NrNodes : total number of nodes in state space. Calculated with get_state_space_stats
* -NrTrans : total number of nodes in state space. Calculated with get_state_space_stats
* -NrProcessed : total number of calculated nodes in state space. Calculated with get_state_space_stats
When Time Milliseconds have elapsed the modelchecker should stop after its next step
#### called by:
* ProB Plugin: ModelCheckingCommand
* ProB 2.0: ModelCheckingStepCommand
Description:
execute_model(+CurStateID,+MaxNrSteps,-TransitionInfo,-ExecutedSteps,-Result)
an execution engine with minimal overhead: states are not stored in visited_expression database, only first enabled operation is taken
Description:
execute_model(+CurStateID,+MaxNrSteps,+Options,-TransitionInfo,-ExecutedSteps,-Result)
Options can contain continue_after_errors, timeout(MS)
Result is either maximum_nr_of_steps_reached, deadlock, error, internal_error, time_out
Description:
extract_b_op(+OpTerm, +PPOpts, -Params, -RetVals)
Extracts information for a B operation.
Description:
extract_b_op_infos(+Term, -Name, -Arguments, -RetVals)
Description:
extract_csp_name_and_args(+OpTerm, -Name, -Args)
Description:
extract_csp_op(+OpTerm, -Params, -RetVals)
Extracts information for a CSP operation.
Description:
extract_node_info(+NodeId,-Count,-Color,+LabelGenerator,-Labels)
Generates information about the nodes found during state space reduction
#### Generated Information:
Count - number of concrete states combined in the abstract state
* Color - the color used to represent this state type in a visualization
* Labels - determine the labels that should appear on a node in a visualization
Description:
extract_op_tuple(+OpTerm, +PPOpts, -Params, -RetVals)
Extracts the parameters and return values of the operations
Description:
extract_trans_info(+ShowSelfLoops,+TransId,-Src,-Dest,-Label,-Style,-Color)
Generates information about the transitions created during state space reduction
#### Generated Information:
Src - ID corresponding to the abstract state that is the source of the abstract transition with TransId
* Dest - ID corresponding to the abstract state that is the destination of the abstract transition with TransId
* Label - the label that should appear on a transition in a visualization
* Style - the style that should be applied to a transition of this type in a visualization (e.g. dashed)
* Color - the color used to represent a transition of this type in a visualization
Description:
filter_states_for_predicate(+Raw,+States,-Filtered)
Takes a list of state ids and a predicate and finds all of the states
for which the predicate is true
#### called by:
ProB 2.0: FilterStatesForPredicateCommand
Description:
Takes a given predicate and finds a state in the state space that satisfies the predicate.
A helper transition is then added to go to the goal state.
#### called by:
ProB 2.0: FindValidStateCommand
Description:
No transitions found -> return with the current state
Start a new exploration path for each solution
Description:
find_trace_from_node_to_node(+FromId,+ToId,-Trace)
Finds a trace from one state to a goal state in the current state space.
#### Parameters:
FromId - Id of source node
* ToId - Id of destination node
* Trace - List of op tuples op(OpId,SrcId,DestId) corresponding to the trace calculated by ProB or atom no_trace_found if the call was unsuccessful
#### called by:
* ProB 2.0: GetShortestTraceCommand
Description:
find_trace_to_node(+StateId,-Trace)
Finds a trace from the root state to the specified state in the current state space.
#### Parameters:
StateId
* Trace - List of op tuples op(OpId,SrcId,DestId) corresponding to the trace calculated by ProB or atom no_trace_found if the call was unsuccessful
#### called by:
* ProB 2.0: GetShortestTraceCommand
Description:
formula_typecheck2_for_eval(+PredOrExpr,+EvalOpts,?Machine,+RawFormula,-TypedFormula,-Type,-Errors)
Description:
generate_trace_until_condition_fulfilled(+CurState,+Condition,-Trace,-Result)
Animates randomly number of steps until a certain (LTL?) condition is fulfilled.
#### Called by:
ProB 2.0: ExecuteUntilCommand
#### Arguments
* CurState - the ID of the current state
* Condition - a condition that should be satisfied at some point (this come as parsed term from the ProB2)
#### Generated Information:
* Trace - a list of triples representing a trace in the state space of the model being analysed
* Result - the result found: ltl_found, typeerror, max_nr_of_steps_reached, deadlock
Description:
Get the predicate representation of a BState
#### called by:
ProB 2.0: GetBStateCommand
Description:
note exclude return the elements where the predicate is not succesful
Description:
Returns the current value of a specified preference.
#### called by:
ProB 2.0: GetPreferenceCommand
Description:
computes the enabling relation information for the provided operations of interest
get_enable_matrix(-PairsOfOperations,+EnableResult)
PairsOfOperations: list of pair(Op1,Op2) of operations pairs for which the enable relation is to be computed
EnableResult: list of terms enable_edges(Op1,Op2,enable_edges(E,KE,D,KD)) of same length
Description:
get_error_messages_with_span_info(-ListOfErrMsgTerms)
each error is of the form: error(ErrMsg,ErrType,ErrLocations)
ErrMsg is an atom (aka string)
ErrType is warning, internal_error or error
ErrLocations is a list of terms error_span(Filename,StartLine,StartCol,EndLine,EndCol)
Note: Filename is '' when not known
#### called by:
ProB 2.0: GetErrorItemsCommand
Description:
Pretty-print the machine's internal representation in B syntax.
#### called by:
ProB 2.0: GetInternalRepresentationCommand
Description:
get_op_from_id(+Id,+Options,-Params,-RetVals)
Extracts information about the parameters and return values for the
specified transition.
#### called by:
ProB 2.0: GetOpFromId
Description:
Access information about the current version of the ProB core.
#### called by:
ProB 2.0: GetInternalRepresentationPrettyPrintCommand
Description:
get_signature_merge_state_space(+IgnoredEvents,-Space)
Takes a list of ignored events, and applies the signature merge algorithm
from module `state_space_reduction` to the current state space.
#### called by:
ProB 2.0: ApplySignatureMergeCommand
Description:
get_states_for_predicate(+Raw,-States,-Errors)
Takes a predicate and finds a list of all state ids for which the
predicate holds. The states that are not intitialized (i.e. root) are
included in the list. The list that is returned is therefore the union
of the uninitialised states and the states for which the predicate holds.
#### called by:
ProB 2.0: GetStatesFromPredicate
Description:
get_statistics(+Option,-Value)
Takes an option for the statistics and returns the corresponding value.
#### called by:
ProB 2.0: GetStatisticsCommand
Description:
get_top_level_formulas(-TopIds)
Gets all top-level formula IDs from bvisual2.
#### called by:
ProB 2.0: GetTopLevelFormulasCommand
Description:
get_transition_diagram(+ParsedExpr,-Space)
Takes a list of ignored events, and calculates a transition diagram
using module `state_space_reduction` for the current state space.
#### called by:
ProB 2.0: CalculateTransitionDiagramCommand
Description:
Access information about the current version of the ProB core.
#### called by:
ProB 2.0: GetVersionCommand
Description:
insert_formula_for_expansion(+AST,-Id)
Inserts a formula into bvisual2 module
The formula is inserted as a child of level "user" in bvisual2
#### called by:
ProB 2.0: InsertFormulaForVisualizationCommand
Description:
list_all_eclipse_preferences(-L)
also includes advanced eclipse preferences
Description:
list_current_eclipse_preferences(-L)
Returns a list of all the preferences with their current values
#### called by:
ProB 2.0: GetCurrentPreferencesCommand
Description:
list_eclipse_preferences(-L)
Returns a list of all normal eclipse preferences as well as their information
(i.e. type, description, category, and default value)
#### called by:
ProB Plugin: GetPreferencesCommand
* ProB 2.0: GetDefaultPreferencesCommand
Description:
load_classical_b_from_list_of_facts(+MainFilename,+ListOfFacts)
Loads a classical b model.
#### called by:
ProB 2.0: LoadBProjectCommand
Description:
load_cspm_spec_from_cspm_file(+CSPMFile)
Takes a path to a CSPM specification and loads the file using the CSPM parser.
#### called by:
ProB 2.0: LoadCSPCommand
Description:
Loads an Event-B model.
#### called by:
ProB Plugin: de.prob.eventb.translator.internal.EventBTranslator, DisproverLoadCommand
* ProB 2.0: de.prob.model.eventb.translate.EventBModelTranslator (LoadEventBProjectCommand)
Description:
Takes a state id and finds all of the operations for which a timeout occurred
#### called by:
ProB Plugin: GetTimeoutedOperationsCommand
* ProB 2.0: GetOperationsWithTimeout
Description:
option_set(+Element, +List, -Result)
Takes an atom and unifies Result with 1 if the atom is in the List.
Otherwise, Result is unified with 0.
Description:
parse_eval_opts(-EvalOpts, +Options, -Options0)
Supported options:
state(StateId): state in which to evaluate the formulas
* provide_stored_let_values: make stored let values visible to the formulas (see eval_let_store module)
* eval_expand(EvalExpand): any of the expand modes supported by store:normalise_value_for_var/4
* timeout(TimeoutMs): per-formula evaluation timeout in milliseconds
Description:
parse_pp_opts(-PPOpts, +Options, -Options0)
Supported options:
truncate(Truncate): either truncate or expand - controls whether result strings are truncated
* translation_mode(TransMode): any of the modes supported by set_translation_mode/1
* language(Language): any of the languages supported by set_language_mode/1
Description:
Takes a predicates and generates a pretty printed string
Description:
This cycles through all of the solutions and extracts the string
representation of the solutions.
Description:
prob2_check_well_definedness(-NrDischarged,-NrTotal)
Description:
Calculates a trace given a list of operation names and a list of guards.
In case of errors, a partial trace is generated that jumps over the errornous operation / event.
In addition, a list of integers should be given as argument that make possible to execute some
operations in the oprations list multiple times or as long as they are disabled (in this case one should give -1).
E.g. by calling prob2_construct_trace(0,[e1,e2,e3],[TRUE,TRUE,TRUE],[2,1,-1],OpsOut,ErrOut) the predicate calculates
a trace starting at the state with the ID 0 where e1 is executed sequentially 2 times, after that e2 once,
and finally e3 until it becomes disabled.
#### called by:
ProB 2.0: ConstructTraceCommand
Description:
prob2_deadlock_freedom_check(+Predicate,-Result)
Performs deadlock freedom checking with constraint Predicate and calulates the Result.
#### called by:
ProB 2.0: ConstraintBasedDeadlockCheckCommand
Description:
prob2_do_ctl_modelcheck(+Formula, +Options, -Result, -CE)
Performs an CTL model checking step.
Supported options:
max_new_states(Max) - maximum number of new states that will be explored, or -1 (the default) for no limit
* mode(Mode) - init (the default) to check starting from every initialized state, or specific_node(StateID) to check starting from one specific state
#### called by:
* ProB 2.0: CtlCheckingCommand
Description:
prob2_do_ltl_modelcheck(+Formula,+Options,-Result)
Performs an LTL model checking step.
Supported options:
max_new_states(Max) - maximum number of new states that will be explored, or -1 (the default) for no limit
* mode(Mode) - init (the default) to check starting from every initialized state, or specific_node(StateID) to check starting from one specific state
#### called by:
* ProB 2.0: LtlCheckingCommand
Description:
prob2_evaluate_bvisual2_formulas(+Ids,+StateId,-Values)
Uses the bvisual2 module to evaluate the given formulas.
Unlike expand_formula_nonrecursive/6, this predicate only evaluates the formulas,
but doesn't return their label, description, or subformulas.
#### called by:
ProB 2.0: EvaluateBVisual2FormulasCommand
Description:
prob2_evaluate_bvisual2_formulas(+Ids,+StateId,+Options,-Values)
New version of the above predicate which also supports options.
Currently supported options:
- unlimited: does not truncate terms
Description:
prob2_evaluate_formulas(+Formulas, +Options, -Results)
Evaluate a list of formulas.
This is more efficient than evaluating each formula individually,
because some calculations (e. g. expanding the current state) don't have to be repeated for each formula.
Supported formula types:
bpred(Raw)
* bexpr(Raw)
* csp(TermCodes)
Supported options:
* all options supported by parse_eval_opts/3
* all options supported by parse_pp_opts/3
Possible results:
* result(Value,Solutions,Errors): evaluation succeeded
* Value: String rep of the value calculated by ProB
* Solutions: List of solutions as a triple: bind(Name,PPSol)
* Name: Free variable from formula
* PPSol: String representation of the solution bound to the name
* Errors: List of error/3 terms for non-fatal errors (warnings or messages) that occurred during evaluation
* errors(Value,Errors): Typechecking or evaluation failed
* Value: Short description of error type (e. g. 'NOT-WELL-DEFINED', 'UNKNOWN')
* Errors: List of error/3 terms for all errors that occurred
* enum_warning: An enumeration warning was thrown during evaluation
Description:
prob2_execute_custom_operations(+CurID, +OpName, +ParsedPredicate, +MaxNrOfSolutions, -TOperations, -Errors)
Calculates an operation given a predicate from the user.
#### called by:
ProB 2.0: GetOperationByPredicateCommand
Description:
prob2_expand_bvisual2_formula(+FormulaId,+Options,-ExpandedFormula)
Uses the bvisual2 module to expand a specified formula,
optionally also expanding child formulas recursively and/or evaluating all expanded formulas.
FormulaId must be a bvisual2 formula ID,
as returned for example by get_top_level_formulas/1, insert_formula_for_expansion/2, or prob2_expand_bvisual2_formula/3.
#### called by:
ProB 2.0: ExpandBVisual2FormulaCommand
Description:
prob2_extended_static_check(-Problems)
Description:
prob2_find_test_path(+Events,+EndPredicate,+TimeoutMs,-ResultOpTerms)
example call | ?- prob2_interface:prob2_find_test_path([enter1],truth(unknown),200,R).
Result is either errors(Errors), timeout, interrupt, infeasible_path, or list of Operation IDs
Description:
prob2_get_formula_type(+Formula,-PPType,-Errors)
Type checks the given untyped formula to determine its type and any type errors.
#### Params:
Formula - bexpr(Raw) or bpred(Raw), where Raw is the Prolog representation of non-typechecked expression or predicate
* PPType - pretty-printed type of formula
* Errors - any errors that have occured during typechecking
#### called by:
ProB 2.0: FormulaTypecheckCommand
Description:
prob2_get_state_errors(+StateId,-Errors)
Takes a id for a given state in the state space and produces a list of all
state based errors.
#### called by:
ProB 2.0: GetStateBasedErrorsCommand
Description:
prob2_invariant_check(+Ops,-Result)
Performs invariant cbc checking for either for all operations or a list of operations.
#### called by:
ProB 2.0: ConstraintBasedInvariantCheckCommand
Description:
StartingPoint, Operations, Predicates, 1:n refinemets, Refinements that are actually use refines, Skip events, Results, Maximum search depth
Description:
prob2_reset_prob
Reset ProB to a clean state as if it was newly started
(except for total_number_of_errors).
#### called by:
ProB 2.0: ResetProBCommand
Description:
register_prob2_formulas(+FormulaUUIDs, +Formulas)
Description:
serialize(+Id,-SerializedState)
Produces a prolog serialization of a given state id
#### called by:
ProB 2.0: SerializeStateCommand
Description:
set_eclipse_preference(+PrefS,+PrefVal)
Sets a preference
#### called by:
ProB Plugin: SetPreferenceCommand
* ProB 2.0: SetPreferenceCommand
Description:
set_goal_for_model_checking(+Goal)
Sets the goal for model checking. The Option search_for_goal needs to be set when starting
model checking in order for this to have an effect on the model checking.
#### called by:
ProB 2.0: SetBGoalCommand
Description:
Synthesis Commands:
#### b_synthesis:start_synthesis_from_ui/13 called by:
* ProB 2.0: BSynthesisCommand
Description:
state_property(+Property,+StateId,-Status)
Finds the status for a given property
Properties can be: invariantKO, timeout_occurred, max_operations_reached, initialised
Statuses are expected to be boolean values: either true or false
#### called by:
ProB Plugin: CheckBooleanPropertyCommand
* ProB 2.0: CheckBooleanPropertyCommand
Description:
trace_to_op_terms(+ListOpIds,+CurID,-ListOpTerms)
Translates a list of transition ids to a list of terms op(TransId,OpName,SrcId,DestId).
The list must represent a trace,
i. e. the first transition must lead to the source state of the second one,
the second transition to the source state of the third, etc.
Description:
update preferences from SET_PREF Definitions in B machines:
should be called after loading a model and before start_animation
Description:
write_dot_for_state_viz(+StateId, +Filename)
Writes a dot representation of the given state to the specified file.