Interface Backend
- All Known Implementing Classes:
AlloyBackend
public interface Backend
A solver of a model behind the solution loop (
Repl): Choco for a
static model, whose solutions are instances, and Alloy for a temporal
model, whose solutions are traces. The loop keeps the solutions shown and
their views; the backend solves, and handles its own commands with its own
messages.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA solution as it is shown, with Alloy's XML of it, if any. -
Method Summary
Modifier and TypeMethodDescriptionvoidcheck(Repl.Io io, Integer line, Repl.Displayer display) check: checks the assertions (on the line, if positive), and shows each counterexample with the loop.booleanHandles a command of the backend's own.fork: another trace with the states of the last trace before the given state, or null once the backend has said why there is none.help()booleannames()The next solution, or null once the backend has said why there is none.config: a solution with another configuration, or null once the backend has said why there is none.intnumber(Repl.Context context) prompt()voidquit()Releases the solver.show(int n, Backend.Shown shown) The full view of the n-th solution, as the backend prints it.voidPrints what comes before the first solution, which the loop then asks for.voidSays that the input is no command.
-
Method Details
-
isDynamic
boolean isDynamic()- Returns:
- whether the model is temporal: its solutions are traces
-
prompt
-
help
-
start
-
next
The next solution, or null once the backend has said why there is none.- Throws:
Exception
-
fork
fork: another trace with the states of the last trace before the given state, or null once the backend has said why there is none.- Throws:
Exception
-
nextConfiguration
config: a solution with another configuration, or null once the backend has said why there is none.- Throws:
Exception
-
check
-
command
-
unknown
-
number
- Returns:
- the number of the next solution shown
-
show
The full view of the n-th solution, as the backend prints it. -
names
- Returns:
- the least-partially-qualified name of a clafer by its UID, for the diff view
-
modelFileName
- Returns:
- the name of the model's file, which names the saved files
-
quit
void quit()Releases the solver.
-