Home

Code Expression

Note that CodeExpression nodes lack the executionPure property that CodeChunk nodes have because they should be side-effect free.

Properties

The CodeExpression type has these properties:

NameDescriptionTypeInherited from
idThe identifier for this item.StringEntity
executionModeUnder which circumstances the code should be executed.ExecutionMode-
compilationDigestA digest of the content, semantics and dependencies of the node.CompilationDigestExecutable
compilationMessagesMessages generated while compiling the code.CompilationMessage*Executable
executionDigestThe compilationDigest of the node when it was last executed.CompilationDigestExecutable
executionDependenciesThe upstream dependencies of this node.ExecutionDependency*Executable
executionDependantsThe downstream dependants of this node.ExecutionDependant*Executable
executionTagsTags in the code which affect its execution.ExecutionTag*Executable
executionCountA count of the number of times that the node has been executed.IntegerExecutable
executionRequiredWhether, and why, the code requires execution or re-execution.ExecutionRequiredExecutable
executionStatusStatus of the most recent, including any current, execution.ExecutionStatusExecutable
executionInstanceThe id of the kernel instance that performed the last execution.StringExecutable
executionEndedThe timestamp when the last execution ended.TimestampExecutable
executionDurationDuration of the last execution.DurationExecutable
executionMessagesMessages emitted while executing the node.ExecutionMessage*Executable
codeThe code.CordCodeExecutable
programmingLanguageThe programming language of the code.String-
executionBoundsThe environment in which code should be executed.ExecutionBoundsCodeExecutable
executionBoundedThe execution bounds, if any, on the last execution.ExecutionBoundsCodeExecutable
authorsThe authors of the executable code.Author*CodeExecutable
provenanceA summary of the provenance of the code.ProvenanceCount*CodeExecutable
outputThe value of the expression when it was last evaluated.Node-

Related

The CodeExpression type is related to these types:

Bindings

The CodeExpression type is represented in:

Testing

During property-based (a.k.a generative) testing, the properties of the CodeExpression type are generated using the following strategies.

PropertyComplexityDescriptionStrategy
codeMin+Generate a simple fixed string of code.Cord::from("code")
Low+Generate a random string of up to 10 alphanumeric characters (excludes whitespace whichcan be problematic in Markdown).r"[a-zA-Z0-9]{1,10}".prop_map(Cord::from)
High+Generate a random string of up to 100 characters (excluding control characters).r"[^\p{C}]{1,100}".prop_map(Cord::from)
MaxGenerate an arbitrary string.String::arbitrary().prop_map(Cord::from)

This documentation was generated from CodeExpression.yaml by docs_types.rs.

© 2026 Stencila