Package org.smtlib.command
Class C_comment
java.lang.Object
org.smtlib.impl.Pos.Posable
org.smtlib.impl.Pos.Printable
org.smtlib.impl.Command
org.smtlib.command.C_comment
- All Implemented Interfaces:
ICommand,ICommand.Icomment,INode,IPos.IPosable
A synthetic pseudo-command representing a comment that appeared immediately before a real
command in a script -- not part of the SMT-LIB command grammar itself, but modeled as a
real, typed
ICommand.Icomment (see issue #115) rather than a generic ICommand, so execution, typed-visitor traversal, and printing all dispatch to it the same
way every other command does, with no reflection-based or generic-fallback special case.
Exists so a script's comments are carried as part of its command sequence -- consistent
with how a script is modeled (List<ICommand>) -- rather than as metadata bolted
onto the next real command. Every real command-dispatch path already just calls
command.execute(solver) on whatever the parser hands it, so this forwards itself to any
solver uniformly, with no per-command-class or per-dispatch-loop code needed. See issue
#42.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.smtlib.ICommand
ICommand.Iassert, ICommand.Icheck_sat, ICommand.Icheck_sat_assuming, ICommand.Icomment, ICommand.Ideclare_const, ICommand.Ideclare_datatype, ICommand.Ideclare_datatypes, ICommand.Ideclare_fun, ICommand.Ideclare_sort, ICommand.Ideclare_sort_parameter, ICommand.Idefine_const, ICommand.Idefine_fun, ICommand.Idefine_fun_rec, ICommand.Idefine_funs_rec, ICommand.Idefine_sort, ICommand.Iecho, ICommand.Iexit, ICommand.IFactory, ICommand.IFinder, ICommand.Iget_assertions, ICommand.Iget_assignment, ICommand.Iget_info, ICommand.Iget_model, ICommand.Iget_option, ICommand.Iget_proof, ICommand.Iget_unsat_assumptions, ICommand.Iget_unsat_core, ICommand.Iget_value, ICommand.Ipop, ICommand.Ipush, ICommand.Ireset, ICommand.Ireset_assertions, ICommand.IScript, ICommand.Iset_info, ICommand.Iset_logic, ICommand.Iset_option -
Field Summary
FieldsFields inherited from class org.smtlib.impl.Command
trailingTextFields inherited from class org.smtlib.impl.Pos.Posable
pos -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TThe accept method corresponding to IVisitor, to be implemented in each subclass as { return v.visit(this); }The command nameExecutes the command on the given solver; presumes that the command type-checked successfully.text()Returns the raw comment text (as captured from source, or as supplied directly via the public API), not yet split into per-line;-prefixed form -- seeCommand.write(org.smtlib.sexpr.Printer).Methods inherited from class org.smtlib.impl.Command
error, setTrailingText, trailingText, write, writeArgsMethods inherited from class org.smtlib.impl.Pos.Printable
toStringMethods inherited from class org.smtlib.impl.Pos.Posable
equals, hashCode, pos, setPosMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.smtlib.IPos.IPosable
pos, setPos
-
Field Details
-
commandName
- See Also:
-
text
-
-
Constructor Details
-
C_comment
-
-
Method Details
-
commandName
Description copied from class:CommandThe command name- Specified by:
commandNamein interfaceICommand- Specified by:
commandNamein classCommand
-
text
Description copied from interface:ICommand.IcommentReturns the raw comment text (as captured from source, or as supplied directly via the public API), not yet split into per-line;-prefixed form -- seeCommand.write(org.smtlib.sexpr.Printer).- Specified by:
textin interfaceICommand.Icomment
-
execute
Description copied from interface:ICommandExecutes the command on the given solver; presumes that the command type-checked successfully. -
accept
Description copied from interface:INodeThe accept method corresponding to IVisitor, to be implemented in each subclass as { return v.visit(this); }- Specified by:
acceptin interfaceINode- Type Parameters:
T- the return type desired from the visit methods- Parameters:
v- the visitor class- Returns:
- the value returned by the visit method
- Throws:
IVisitor.VisitorException
-