cvc4-1.4
CVC4::DeclareFunctionCommand Class Reference

#include <command.h>

Inheritance diagram for CVC4::DeclareFunctionCommand:
Collaboration diagram for CVC4::DeclareFunctionCommand:

Public Types

typedef CommandPrintSuccess printsuccess
 

Public Member Functions

 DeclareFunctionCommand (const std::string &id, Expr func, Type type) throw ()
 
 ~DeclareFunctionCommand () throw ()
 
Expr getFunction () const throw ()
 
Type getType () const throw ()
 
bool getPrintInModel () const throw ()
 
bool getPrintInModelSetByUser () const throw ()
 
void setPrintInModel (bool p)
 
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.
 
Commandclone () const
 Clone this Command (make a shallow copy).
 
std::string getCommandName () const throw ()
 
virtual void invoke (SmtEngine *smtEngine, std::ostream &out) 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.
 
bool isMuted () throw ()
 Determine whether this Command will print a success message.
 
bool ok () const throw ()
 Either the command hasn't run yet, or it completed successfully (CommandSuccess, not CommandUnsupported or CommandFailure).
 
bool fail () const throw ()
 The command completed in a failure state (CommandFailure, not CommandSuccess or CommandUnsupported).
 
const CommandStatusgetCommandStatus () const throw ()
 Get the command status (it's NULL if we haven't run yet).
 
virtual void printResult (std::ostream &out, uint32_t verbosity=2) const throw ()
 

Protected Attributes

Expr d_func
 
Type d_type
 
bool d_printInModel
 
bool d_printInModelSetByUser
 
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.
 
bool d_muted
 True if this command is "muted"—i.e., don't print "success" on successful execution.
 

Detailed Description

Definition at line 350 of file command.h.

Member Typedef Documentation

◆ printsuccess

Definition at line 203 of file command.h.

Constructor & Destructor Documentation

◆ DeclareFunctionCommand()

CVC4::DeclareFunctionCommand::DeclareFunctionCommand ( const std::string & id,
Expr func,
Type type )
throw ( )

◆ ~DeclareFunctionCommand()

CVC4::DeclareFunctionCommand::~DeclareFunctionCommand ( )
throw ( )
inline

Definition at line 358 of file command.h.

Member Function Documentation

◆ clone()

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

Clone this Command (make a shallow copy).

Implements CVC4::Command.

◆ exportTo()

Command * CVC4::DeclareFunctionCommand::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.

Implements CVC4::Command.

◆ fail()

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

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

◆ getCommandName()

std::string CVC4::DeclareFunctionCommand::getCommandName ( ) const
throw ( )
virtual

Implements CVC4::Command.

◆ getCommandStatus()

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.

◆ getFunction()

Expr CVC4::DeclareFunctionCommand::getFunction ( ) const
throw ( )

◆ getPrintInModel()

bool CVC4::DeclareFunctionCommand::getPrintInModel ( ) const
throw ( )

◆ getPrintInModelSetByUser()

bool CVC4::DeclareFunctionCommand::getPrintInModelSetByUser ( ) const
throw ( )

◆ getSymbol()

std::string CVC4::DeclarationDefinitionCommand::getSymbol ( ) const
throw ( )
inherited

◆ getType()

Type CVC4::DeclareFunctionCommand::getType ( ) const
throw ( )

◆ invoke() [1/2]

virtual void CVC4::Command::invoke ( SmtEngine * smtEngine,
std::ostream & out )
throw ( )
virtualinherited

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

◆ invoke() [2/2]

void CVC4::DeclareFunctionCommand::invoke ( SmtEngine * smtEngine)
throw ( )
virtual

◆ isMuted()

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

Determine whether this Command will print a success message.

Definition at line 228 of file command.h.

◆ ok()

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

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

◆ printResult()

◆ setMuted()

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.

◆ setPrintInModel()

void CVC4::DeclareFunctionCommand::setPrintInModel ( bool p)

◆ toStream()

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

◆ toString()

std::string CVC4::Command::toString ( ) const
throw ( )
inherited

Field Documentation

◆ d_commandStatus

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.

◆ d_func

Expr CVC4::DeclareFunctionCommand::d_func
protected

Definition at line 352 of file command.h.

◆ d_muted

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.

◆ d_printInModel

bool CVC4::DeclareFunctionCommand::d_printInModel
protected

Definition at line 354 of file command.h.

◆ d_printInModelSetByUser

bool CVC4::DeclareFunctionCommand::d_printInModelSetByUser
protected

Definition at line 355 of file command.h.

◆ d_symbol

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

Definition at line 342 of file command.h.

◆ d_type

Type CVC4::DeclareFunctionCommand::d_type
protected

Definition at line 353 of file command.h.


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