cvc4-1.4
CVC4::DefineNamedFunctionCommand Class Reference

This differs from DefineFunctionCommand only in that it instructs the SmtEngine to "remember" this function for later retrieval with getAssignment(). More...

#include <command.h>

Inheritance diagram for CVC4::DefineNamedFunctionCommand:
CVC4::DefineFunctionCommand CVC4::DeclarationDefinitionCommand CVC4::Command

Public Types

typedef CommandPrintSuccess printsuccess
 

Public Member Functions

 DefineNamedFunctionCommand (const std::string &id, Expr func, const std::vector< Expr > &formals, Expr formula) throw ()
 
void invoke (SmtEngine *smtEngine) throw ()
 
CommandexportTo (ExprManager *exprManager, ExprManagerMapCollection &variableMap)
 Maps this Command into one for a different ExprManager, using variableMap for the translation and extending it with any new mappings. More...
 
Commandclone () const
 Clone this Command (make a shallow copy). More...
 
Expr getFunction () const throw ()
 
const std::vector< Expr > & getFormals () const throw ()
 
Expr getFormula () const throw ()
 
virtual void invoke (SmtEngine *smtEngine, std::ostream &out) throw ()
 
std::string getCommandName () const throw ()
 
std::string getSymbol () const throw ()
 
virtual void toStream (std::ostream &out, int toDepth=-1, bool types=false, size_t dag=1, OutputLanguage language=language::output::LANG_AUTO) const throw ()
 
std::string toString () const throw ()
 
void setMuted (bool muted) throw ()
 If false, instruct this Command not to print a success message. More...
 
bool isMuted () throw ()
 Determine whether this Command will print a success message. More...
 
bool ok () const throw ()
 Either the command hasn't run yet, or it completed successfully (CommandSuccess, not CommandUnsupported or CommandFailure). More...
 
bool fail () const throw ()
 The command completed in a failure state (CommandFailure, not CommandSuccess or CommandUnsupported). More...
 
const CommandStatusgetCommandStatus () const throw ()
 Get the command status (it's NULL if we haven't run yet). More...
 
virtual void printResult (std::ostream &out, uint32_t verbosity=2) const throw ()
 

Protected Attributes

Expr d_func
 
std::vector< Exprd_formals
 
Expr d_formula
 
std::string d_symbol
 
const CommandStatusd_commandStatus
 This field contains a command status if the command has been invoked, or NULL if it has not. More...
 
bool d_muted
 True if this command is "muted"—i.e., don't print "success" on successful execution. More...
 

Detailed Description

This differs from DefineFunctionCommand only in that it instructs the SmtEngine to "remember" this function for later retrieval with getAssignment().

Used for :named attributes in SMT-LIBv2.

Definition at line 425 of file command.h.

Member Typedef Documentation

Definition at line 203 of file command.h.

Constructor & Destructor Documentation

CVC4::DefineNamedFunctionCommand::DefineNamedFunctionCommand ( const std::string &  id,
Expr  func,
const std::vector< Expr > &  formals,
Expr  formula 
)
throw (
)

Member Function Documentation

Command* CVC4::DefineNamedFunctionCommand::clone ( ) const
virtual

Clone this Command (make a shallow copy).

Reimplemented from CVC4::DefineFunctionCommand.

Command* CVC4::DefineNamedFunctionCommand::exportTo ( ExprManager exprManager,
ExprManagerMapCollection variableMap 
)
virtual

Maps this Command into one for a different ExprManager, using variableMap for the translation and extending it with any new mappings.

Reimplemented from CVC4::DefineFunctionCommand.

bool CVC4::Command::fail ( ) const
throw (
)
inherited

The command completed in a failure state (CommandFailure, not CommandSuccess or CommandUnsupported).

std::string CVC4::DefineFunctionCommand::getCommandName ( ) const
throw (
)
virtualinherited

Implements CVC4::Command.

const CommandStatus* CVC4::Command::getCommandStatus ( ) const
throw (
)
inlineinherited

Get the command status (it's NULL if we haven't run yet).

Definition at line 243 of file command.h.

References CVC4::options::verbosity.

const std::vector<Expr>& CVC4::DefineFunctionCommand::getFormals ( ) const
throw (
)
inherited
Expr CVC4::DefineFunctionCommand::getFormula ( ) const
throw (
)
inherited
Expr CVC4::DefineFunctionCommand::getFunction ( ) const
throw (
)
inherited
std::string CVC4::DeclarationDefinitionCommand::getSymbol ( ) const
throw (
)
inherited
virtual void CVC4::Command::invoke ( SmtEngine smtEngine,
std::ostream &  out 
)
throw (
)
virtualinherited

Reimplemented in CVC4::CommandSequence, and CVC4::EchoCommand.

void CVC4::DefineNamedFunctionCommand::invoke ( SmtEngine smtEngine)
throw (
)
virtual

Reimplemented from CVC4::DefineFunctionCommand.

bool CVC4::Command::isMuted ( )
throw (
)
inlineinherited

Determine whether this Command will print a success message.

Definition at line 228 of file command.h.

bool CVC4::Command::ok ( ) const
throw (
)
inherited

Either the command hasn't run yet, or it completed successfully (CommandSuccess, not CommandUnsupported or CommandFailure).

void CVC4::Command::setMuted ( bool  muted)
throw (
)
inlineinherited

If false, instruct this Command not to print a success message.

Definition at line 223 of file command.h.

virtual void CVC4::Command::toStream ( std::ostream &  out,
int  toDepth = -1,
bool  types = false,
size_t  dag = 1,
OutputLanguage  language = language::output::LANG_AUTO 
) const
throw (
)
virtualinherited
std::string CVC4::Command::toString ( ) const
throw (
)
inherited

Field Documentation

const CommandStatus* CVC4::Command::d_commandStatus
protectedinherited

This field contains a command status if the command has been invoked, or NULL if it has not.

This field is either a dynamically-allocated pointer, or it's a pointer to the singleton CommandSuccess instance. Doing so is somewhat asymmetric, but it avoids the need to dynamically allocate memory in the common case of a successful command.

Definition at line 194 of file command.h.

std::vector<Expr> CVC4::DefineFunctionCommand::d_formals
protectedinherited

Definition at line 404 of file command.h.

Expr CVC4::DefineFunctionCommand::d_formula
protectedinherited

Definition at line 405 of file command.h.

Expr CVC4::DefineFunctionCommand::d_func
protectedinherited

Definition at line 403 of file command.h.

bool CVC4::Command::d_muted
protectedinherited

True if this command is "muted"—i.e., don't print "success" on successful execution.

Definition at line 200 of file command.h.

std::string CVC4::DeclarationDefinitionCommand::d_symbol
protectedinherited

Definition at line 342 of file command.h.


The documentation for this class was generated from the following file: