symbolic

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 39 Imported by: 0

README

Symbolic

Code Organization

This package implements symbolic evaluation and typechecking. This package does not implement a type system in the traditional sense.

  • eval.go: main evaluation logic
  • eval_call.go: function call evaluation logic
  • state.go: symbolic evaluation state
  • data.go: symbolic evaluation and type checking data (e.g. typechecking errors, warnings)
  • narrowing_widening.go: type narrowing and widening
  • multivalue.go: symbolic representation of value unions
  • intersection.go: type intersection
  • readonly.go: interfaces and helpers related to readonly values (unrelated to immutable values)
  • pattern.go: symbolic representation of Inox patterns (e.g object pattens)
  • error.go: error message constants and formatting

The other files contain the symbolic representations of Inox values: most of the files in the core package have a counterpart in this package.

Implementation Details

Representation

Symbolic values are immutable. They are replaced when a mutation happens in analyzed code. In the following example the symbolic representation of {a: 1} (an *Object) is immutable. When obj is mutated the scope is updated with a new *Object of value {a: 2} assigned to obj.

obj = {a: 1}
obj.a = 2   

Documentation

Index

Constants

View Source
const (
	DB_MIGRATION__DELETIONS_PROP_NAME       = "deletions"
	DB_MIGRATION__INCLUSIONS_PROP_NAME      = "inclusions"
	DB_MIGRATION__REPLACEMENTS_PROP_NAME    = "replacements"
	DB_MIGRATION__INITIALIZATIONS_PROP_NAME = "initializations"

	EXPLANATION_ABOUT_RESTRICTED_SYNTAX_IN_MIGRATION_HANDLERS = `Migration handlers are restricted in order to avoid issues and long execution times, the list of functions usable inside the handlers can be found here: ` +
		`https://github.com/inoxlang/inox/blob/main/docs/language-reference/databases.md#handler-restrictions`
)
View Source
const (
	CALLEE_HAS_NODE_BUT_NOT_DEFINED                         = "callee is a node but has no defined type"
	CANNOT_CALL_GO_FUNC_NO_CONCRETE_VALUE                   = "cannot call go function with no concrete value"
	SPREAD_ARGS_NOT_SUPPORTED_FOR_NON_VARIADIC_FUNCS        = "spread arguments are not supported when calling non-variadic functions"
	FUNCS_CALLED_RECU_SHOULD_HAVE_RET_TYPE                  = "functions called recursively should have a return type"
	INVALID_MUST_CALL_OF_AN_INOX_FN_RETURN_TYPE_MUST_BE_XXX = "" /* 164-byte string literal not displayed */
	NO_ERROR_IS_RETURNED                                    = "no error is returned"
	ERROR_IS_ALWAYS_RETURNED_THIS_WILL_CAUSE_A_PANIC        = "error is always returned, this will cause a panic"

	STR_TEMPL_LITS_WITH_INTERP_SHOULD_BE_PRECEDED_BY_PATTERN_WICH_NAME_HAS_PREFIX = "string template literals with interpolations should be preceded by a pattern which name has a prefix"

	//spread
	CANNOT_SPREAD_OBJ_PATTERN_THAT_MATCHES_ANY_OBJECT = "cannot spread an object pattern that matches any object"
	CANNOT_SPREAD_REC_PATTERN_THAT_MATCHES_ANY_RECORD = "cannot spread an record pattern that matches any record"
	CANNOT_SPREAD_OBJ_PATTERN_THAT_IS_INEXACT         = "cannot spread an object pattern that is inexact"
	SPREAD_ELEMENT_SHOULD_BE_A_LIST                   = "spread element should be a list"
	SPREAD_ELEMENT_SHOULD_BE_A_TUPLE                  = "spread element should be a tuple"

	//object pattern
	PROPERTY_PATTERNS_IN_OBJECT_AND_REC_PATTERNS_MUST_HAVE_SERIALIZABLE_VALUEs = "property patterns in object and record patterns must have serializable values"

	CANNOT_ADD_NEW_PROPERTY_TO_AN_EXACT_OBJECT = "cannot add new property to an exact object"

	MISSING_RETURN_IN_FUNCTION                                                   = "missing return in function"
	MISSING_UNCONDITIONAL_RETURN_IN_FUNCTION                                     = "missing unconditional return in function"
	INVALID_ASSIGN_INT_OPER_ASSIGN_LHS_NOT_INT                                   = "invalid assignment: left hand side is not an integer"
	INVALID_ASSIGN_INT_OPER_ASSIGN_RHS_NOT_INT                                   = "invalid assignment: right hand side is not an integer"
	INVALID_ASSIGN_NON_SERIALIZABLE_VALUE_NOT_ALLOWED_AS_PROPS_OF_SERIALIZABLE   = "invalid assignment: non-serializable values are not allowed as properties of serializable values"
	INVALID_ASSIGN_MUTABLE_NON_WATCHABLE_VALUE_NOT_ALLOWED_AS_PROPS_OF_WATCHABLE = "invalid assignment: mutable values that are not watchable are not allowed as properties of watchable values"
	PROP_SPREAD_IN_REC_NOT_SUPP_YET                                              = "property spread not supported in record yet"
	CONSTRAINTS_INIT_BLOCK_EXPLANATION                                           = "invalid statement or expression in constraints' initialization block"

	NON_SERIALIZABLE_VALUES_NOT_ALLOWED_AS_INITIAL_VALUES_OF_SERIALIZABLE   = "non-serializable values are not allowed as initial values for elements or properties of serializables"
	MUTABLE_NON_WATCHABLE_VALUES_NOT_ALLOWED_AS_INITIAL_VALUES_OF_WATCHABLE = "mutable values that are not watchable are not allowed as initial values for elements or properties of watchables"
	NON_SERIALIZABLE_VALUES_NOT_ALLOWED_AS_ELEMENTS_OF_SERIALIZABLE         = "non-serializable values are not allowed as elements of serializables"
	MUTABLE_NON_WATCHABLE_VALUES_NOT_ALLOWED_AS_ELEMENTS_OF_WATCHABLE       = "mutables values that are not watchable values are not allowed as elements of watchables"

	INDEX_IS_OUT_OF_BOUNDS                        = "index is out of bounds"
	START_INDEX_IS_OUT_OF_BOUNDS                  = "start index is out of bounds"
	END_INDEX_SHOULD_BE_LESS_OR_EQUAL_START_INDEX = "(exclusive) end index should be less or equal to start index"
	IMPOSSIBLE_TO_KNOW_UPDATED_ELEMENT            = "impossible to know updated element"
	IMPOSSIBLE_TO_KNOW_UPDATED_ELEMENTS           = "impossible to know updated elements"

	EXTRACTION_DOES_NOT_SUPPORT_DYNAMIC_VALUES = "extraction does not support dynamic values"

	UPPER_BOUND_OF_QTY_RANGE_LIT_SHOULD_OF_SAME_TYPE_AS_LOWER_BOUND = "the upper bound of a quantity range literal should be of the same type as the lower bound"

	INVALID_KEY_IN_COMPUTE_EXPRESSION_ONLY_SIMPLE_VALUE_ARE_SUPPORTED = "invalid key in compute expression: only simple values are supported"

	CANNOT_CREATE_OPTIONAL_PATTERN_WITH_PATT_MATCHING_NIL           = "cannot create optional pattern with pattern matching nil"
	KEY_VAR_SHOULD_BE_PROVIDED_ONLY_WHEN_ITERATING_OVER_AN_ITERABLE = "a key variable should be provided only when iterating over an iterable"

	ELEMS_OF_TUPLE_SHOUD_BE_IMMUTABLE                  = "elements of a tuple should be immutable"
	ELEM_PATTERNS_OF_TUPLE_SHOUD_MATCH_ONLY_IMMUTABLES = "element patterns of a tuple pattern should match only immutable values"
	UNSUPPORTED_PARAM_TYPE_FOR_RUNTIME_TYPECHECK       = "unsupported parameter type for runtime typecheck"

	CONCATENATION_SUPPORTED_TYPES_EXPLANATION = "only string, bytes & tuple concatenations are supported for now"
	SPREAD_ELEMENT_SHOULD_BE_ITERABLE         = "spread element in concenation should be iterable"

	NESTED_RECURSIVE_FUNCTION_DECLARATION = "nested recursive function declarations are not allowed"
	THIS_EXPR_STMT_SYNTAX_IS_NOT_ALLOWED  = "this expression/statement/syntax element is not allowed in this function"

	NAMESPACE_APPLIED_TO_XML_ELEMENT_SHOUD_BE_A_RECORD           = "namespace applied to xml element should be an Inox namespace such as html"
	MISSING_FACTORY_IN_NAMESPACE_APPLIED_TO_XML_ELEMENT          = "namespace applied to xml has not a " + FROM_XML_FACTORY_NAME + " property"
	FROM_XML_FACTORY_IS_NOT_A_GO_FUNCTION                        = "factory ." + FROM_XML_FACTORY_NAME + " is not a Go function"
	FROM_XML_FACTORY_SHOULD_NOT_BE_A_SHARED_FUNCTION             = "factory ." + FROM_XML_FACTORY_NAME + " should not be a shared function"
	FROM_XML_FACTORY_SHOULD_HAVE_AT_LEAST_ONE_NON_VARIADIC_PARAM = "factory ." + FROM_XML_FACTORY_NAME + " should have at least one non variadic parameter"

	//exact value pattern
	ONLY_SERIALIZABLE_IMMUT_VALS_ALLOWED_IN_EXACT_VAL_PATTERN = "only serializable immutable values are allowed in an exact value pattern"

	//record literal
	INVALID_ELEM_ELEMS_OF_RECORD_SHOULD_BE_IMMUTABLE = "invalid element, elements of a record should be immutable"

	//module import
	IMPORTED_MOD_PATH_MUST_END_WITH_IX = "imported module's path must end with '" + inoxconsts.INOXLANG_FILE_EXTENSION + "'"
	IMPORTED_MODULE_HAS_ERRORS         = "imported module has errors"

	INVALID_MUTATION                               = "invalid mutation"
	PATTERN_IS_NOT_CONVERTIBLE_TO_READONLY_VERSION = "pattern is not convertible to a readonly version"

	//spawn expression
	INVALID_SPAWN_EXPR_WITH_SHORTHAND_SYNTAX_CALLEE_SHOULD_BE_AN_FN_IDENTIFIER_OR_A_NAMESPACE_METHOD = "invalid spawn expression with the shorthand syntax: callee should be a function identifier or a namespace method"

	//permissions
	POSSIBLE_MISSING_PERM_TO_CREATE_A_LTHREAD = "missing permission to create a lthread"

	META_VAL_OF_LIFETIMEJOB_SHOULD_BE_IMMUTABLE                         = "meta value of lifetime job should be immutable"
	LIFETIME_JOBS_NOT_ALLOWED_IN_READONLY_OBJECTS                       = "lifetime jobs are not allowed in readonly objects"
	PROPERTY_VALUES_OF_READONLY_OBJECTS_SHOULD_BE_READONLY_OR_IMMUTABLE = "property values of readonly objects should be readonly or immutable"

	//treedata
	VALUES_INSIDE_A_TREEDATA_SHOULD_BE_IMMUTABLE    = "values inside a treedata should be immutable"
	VALUES_INSIDE_A_TREEDATA_SHOULD_BE_SERIALIZABLE = "values inside a treedata should be serializable"

	DOUBLE_COLON_EXPRS_ONLY_SUPPORT_OBJ_LHS_FOR_NOW = "double-colon expressions only support object LHS for now"

	RHS_OF_DOUBLE_COLON_EXPRS_WITH_OBJ_LHS_SHOULD_BE_THE_NAME_OF_A_MUTABLE_NON_SHARABLE_VALUE_PROPERTY = "" /* 132-byte string literal not displayed */

	USELESS_MUTATION_IN_CLONED_PROP_VALUE = "useless mutation in a cloned property's value"

	//double colon expression
	MISPLACED_DOUBLE_COLON_EXPR                               = "misplaced double-colon expression"
	MISPLACED_DOUBLE_COLON_EXPR_EXT_METHOD_CAN_ONLY_BE_CALLED = "misplaced double-colon expression: extension methods can only be called"
	DIRECTLY_CALLING_METHOD_OF_URL_REF_ENTITY_NOT_ALLOWED     = "directly calling the method of a URL-referenced entity is not allowed"

	OPERANDS_OF_BINARY_RANGE_EXPRS_SHOULD_BE_SERIALIZABLE = "operands of binary range expressions should be serializable"
	VARIABLE_DECL_ANNOTATION_MUST_BE_A_PATTERN            = "variable declaration annotation must be a pattern"

	//match statement
	AN_EXACT_VALUE_USED_AS_MATCH_CASE_SHOULD_BE_SERIALIZABLE = "an exact value used as a match case should be serializable"

	//extend statement
	EXTENDED_PATTERN_MUST_BE_CONCRETIZABLE_AT_CHECK_TIME = "extended pattern must be concretizable at check time (example of non concretizable pattern: %{a: $runtime-value})"
	ONLY_SERIALIZABLE_VALUE_PATTERNS_ARE_ALLOWED         = "only patterns of serializable values are allowed"
	KEYS_OF_EXT_OBJ_MUST_BE_VALID_INOX_IDENTS            = "" /* 143-byte string literal not displayed */
	META_PROPERTIES_NOT_ALLOWED_IN_EXTENSION_OBJECT      = "metaproperties are not allowed in the extension object"

	THIS_VAL_IS_AN_OPT_LIT_DID_YOU_FORGET_A_SPACE = "this value is an option literal, did you forget a space between '-' and the variable name ?"

	//database
	CURRENT_DATABASE_SCHEMA_SAME_AS_PASSED       = "" /* 153-byte string literal not displayed */
	PATH_OF_URL_SHOULD_NOT_HAVE_A_TRAILING_SLASH = "path of URL should not have a trailing slash"
	ROOT_PATH_NOT_ALLOWED_REFERS_TO_DB           = "the root path is not allowed because it refers to the database"
	INDEX_IS_OUT_OF_RANGE                        = "index is out of range"

	//test suites & cases
	META_VAL_OF_TEST_SUITE_SHOULD_EITHER_BE_A_STRING_OR_A_RECORD    = "the meta value of a test suite should either be a string or an object (e.g. {name: \"my test suite\"})"
	META_VAL_OF_TEST_CASE_SHOULD_EITHER_BE_A_STRING_OR_A_RECORD     = "the meta value of a test case should either be a string or an object (e.g. {name: \"my test suite\"})"
	PROGRAM_TESTING_ONLY_SUPPORTED_IN_PROJECTS                      = "program testing is only supported in projects"
	MAIN_DB_SCHEMA_CAN_ONLY_BE_SPECIFIED_WHEN_TESTING_A_PROGRAM     = "main database schema can only be specified when testing a program"
	MAIN_DB_MIGRATIONS_CAN_ONLY_BE_SPECIFIED_WHEN_TESTING_A_PROGRAM = "main database migrations can only be specified when testing a program"
	MISSING_MAIN_DB_MIGRATIONS_PROPERTY                             = "missing property: '" + TEST_ITEM_META__MAIN_DB_MIGRATIONS + "'"

	RIGHT_OPERAND_MAY_NOT_HAVE_A_URL = "right operand may not have a URL"

	CANNOT_POP_FROM_EMPTY_LIST     = "cannot pop() from an empty list"
	CANNOT_DEQUEUE_FROM_EMPTY_LIST = "cannot dequeue() from an empty list"

	//struct definition
	ONLY_COMPILE_TIME_TYPES_CAN_BE_USED_AS_STRUCT_FIELD_TYPES = "only compile-time types can be used as struct field types (struct types, int, float, bool and string)"

	//new expression
	ONLY_COMPILE_TIME_TYPES_CAN_BE_USED_IN_NEW_EXPRS = "only compile-time types can be used in 'new' expressions (struct types, int, float, bool and string)"
	POINTER_TYPES_CANNOT_BE_USED_IN_NEW_EXPRS_YET    = "pointer types cannot be used in 'new' expressions yet"

	//struct
	OPTIONAL_MEMBER_EXPRS_NOT_ALLOWED_FOR_STRUCT_FIELDS = "optional member expressions are not allowed for struct fields"

	POINTED_VALUE_HAS_NO_PROPERTIES = "pointed value has no properties"

	LEFT_OPERAND_DOES_NOT_IMPL_COMPARABLE_          = "left operand does not implement comparable"
	RIGHT_OPERAND_DOES_NOT_IMPL_COMPARABLE_         = "right operand does not implement comparable"
	OPERANDS_NOT_COMPARABLE_BECAUSE_DIFFERENT_TYPES = "operands are not comparable because they have different types"

	CALL_MAY_RETURN_ERROR_NOT_HANDLED_EITHER_HANDLE_IT_OR_TURN_THE_CALL_IN_A_MUST_CALL = "call may return an error that is not handled, handle it or turn the call in a 'must' call (e.g. `callee()` -> `callee!()`)"

	//DURATION ARITHMETIC
	A_DURATION_CAN_ONLY_BE_ADDED_WITH_A_DURATION_DATE_DATETIME = "a duration can only be added with a duration, date"
	A_DURATION_CAN_BE_SUBSTRACTED_FROM_A_DATETIME              = "a duration can be substracted from a datetime, not the other way around"
	A_DURATION_CAN_ONLY_BE_SUBSTRACTED_FROM_DURATION_DATETIME  = "a duration can only be substracted from  a duration, date"

	//DATETIME ARITHMETIC
	A_DATETIME_CAN_ONLY_BE_ADDED_WITH_A_DURATION       = "a datetime can only be added with a duration"
	ONLY_A_DURATION_CAN_BE_SUBSTRACTED_FROM_A_DATETIME = "only a duration can be substracted from a datetime, not the other way around"
)
View Source
const (
	LTHREAD_META_GROUP_SECTION   = "group"
	LTHREAD_META_ALLOW_SECTION   = "allow"
	LTHREAD_META_GLOBALS_SECTION = "globals"
)
View Source
const (
	REGEX_SYNTAX                       = syntax.Perl
	MAX_UNION_PATTERN_FLATTENING_DEPTH = 5
)
View Source
const (
	TEST_ITEM_META__NAME_PROPNAME      = "name"
	TEST_ITEM_META__FS_PROPNAME        = "fs"
	TEST_ITEM_META__PROGRAM_PROPNAME   = "program"
	TEST_ITEM_META__PASS_LIVE_FS_COPY  = "pass-live-fs-copy-to-subtests"
	TEST_ITEM_META__MAIN_DB_SCHEMA     = "main-db-schema"
	TEST_ITEM_META__MAIN_DB_MIGRATIONS = "main-db-migrations"
)
View Source
const (
	FROM_XML_FACTORY_NAME = "from_xml_elem"
)
View Source
const INITIAL_NO_CHECK_FUEL = 10
View Source
const (
	MAX_INTERSECTION_COMPUTATION_DEPTH = 10
)
View Source
const (
	MAX_RECURSIVE_TEST_CALL_DEPTH = 20
)
View Source
const (
	MAX_STRING_SUGGESTION_DIFF = 3
)
View Source
const (
	PRETTY_PRINT_BUFF_WRITER_SIZE = 100
)

Variables

View Source
var (
	API_PROPNAMES = []string{"version", "schema", "data"}

	ANY_API = NewApiIL(NewAnyObjectPattern())
)
View Source
var (
	AST_NODE_PROPNAMES = []string{"position", "token-at-position"}
	TOKEN_PROPNAMES    = []string{"type", "rune-count"}

	ANY_AST_NODE     = &AstNode{}
	ANY_TOKEN        = &Token{}
	ANY_TOKEN_OR_NIL = NewMultivalue(ANY_TOKEN, Nil)
)
View Source
var (
	ANY_BYTES_LIKE   = &AnyBytesLike{}
	ANY_BYTE_SLICE   = &ByteSlice{}
	ANY_BYTE         = &Byte{}
	ANY_BYTES_CONCAT = &BytesConcatenation{}
)
View Source
var (
	ErrCannotAddNonSharableToSharedContainer = errors.New("cannot add a non sharable element to a shared container")

	ANY_CONTAINER = &AnyContainer{}
)
View Source
var (
	SYMBOLIC_DATA_PROP_NAMES = []string{"errors"}

	ErrComptimeTypeAlreadyDefined = errors.New("comptile-time type is already defined")
)
View Source
var (
	DICTIONARY_PROPNAMES = []string{"get", "set"}
	LIST_PROPNAMES       = []string{"append", "dequeue", "pop", "sorted", "sort_by", "len"}

	ANY_INDEXABLE    = &AnyIndexable{}
	ANY_ARRAY        = NewArrayOf(ANY)
	ANY_TUPLE        = NewTupleOf(ANY_SERIALIZABLE)
	ANY_ORDERED_PAIR = NewOrderedPair(ANY_SERIALIZABLE, ANY_SERIALIZABLE)
	ANY_OBJ          = &Object{}
	ANY_READONLY_OBJ = &Object{readonly: true}
	ANY_REC          = &Record{}
	ANY_DICT         = NewAnyDictionary()
	ANY_KEYLIST      = NewAnyKeyList()

	EMPTY_OBJECT          = NewEmptyObject()
	EMPTY_READONLY_OBJECT = NewEmptyReadonlyObject()
	EMPTY_LIST            = NewList()
	EMPTY_READONLY_LIST   = NewReadonlyList()
	EMPTY_TUPLE           = NewTuple()

	STRLIKE_LIST = NewListOf(ANY_STR_LIKE)
)
View Source
var (
	DATABASE_PROPNAMES = []string{"update_schema", "close", "schema"}

	ANY_DATABASE = NewDatabaseIL(DatabaseILParams{Schema: NewAnyObjectPattern(), SchemaUpdateExpected: false})
)
View Source
var (
	ErrNotImplementedYet = errors.New("not implemented yet")
	ErrUnreachable       = errors.New("unreachable")
)
View Source
var (
	ERR_PROPNAMES = []string{"text", "data"}
	ANY_ERR       = &Error{data: ANY}
)
View Source
var (
	CTX_PTR_TYPE                         = reflect.TypeOf((*Context)(nil))
	ERROR_TYPE                           = reflect.TypeOf((*Error)(nil))
	SYMBOLIC_VALUE_INTERFACE_TYPE        = reflect.TypeOf((*Value)(nil)).Elem()
	SERIALIZABLE_INTERFACE_TYPE          = reflect.TypeOf((*Serializable)(nil)).Elem()
	ITERABLE_INTERFACE_TYPE              = reflect.TypeOf((*Iterable)(nil)).Elem()
	SERIALIZABLE_ITERABLE_INTERFACE_TYPE = reflect.TypeOf((*SerializableIterable)(nil)).Elem()
	INDEXABLE_INTERFACE_TYPE             = reflect.TypeOf((*Indexable)(nil)).Elem()
	SEQUENCE_INTERFACE_TYPE              = reflect.TypeOf((*Sequence)(nil)).Elem()
	MUTABLE_SEQUENCE_INTERFACE_TYPE      = reflect.TypeOf((*MutableSequence)(nil)).Elem()
	INTEGRAL_INTERFACE_TYPE              = reflect.TypeOf((*Integral)(nil)).Elem()
	WRITABLE_INTERFACE_TYPE              = reflect.TypeOf((*Writable)(nil)).Elem()
	STRLIKE_INTERFACE_TYPE               = reflect.TypeOf((*StringLike)(nil)).Elem()
	BYTESLIKE_INTERFACE_TYPE             = reflect.TypeOf((*BytesLike)(nil)).Elem()

	IPROPS_INTERFACE_TYPE              = reflect.TypeOf((*IProps)(nil)).Elem()
	PROTOCOL_CLIENT_INTERFACE_TYPE     = reflect.TypeOf((*ProtocolClient)(nil)).Elem()
	READABLE_INTERFACE_TYPE            = reflect.TypeOf((*Readable)(nil)).Elem()
	PATTERN_INTERFACE_TYPE             = reflect.TypeOf((*Pattern)(nil)).Elem()
	RESOURCE_NAME_INTERFACE_TYPE       = reflect.TypeOf((*ResourceName)(nil)).Elem()
	VALUE_RECEIVER_INTERFACE_TYPE      = reflect.TypeOf((*MessageReceiver)(nil)).Elem()
	STREAMABLE_INTERFACE_TYPE          = reflect.TypeOf((*StreamSource)(nil)).Elem()
	WATCHABLE_INTERFACE_TYPE           = reflect.TypeOf((*Watchable)(nil)).Elem()
	STR_PATTERN_ELEMENT_INTERFACE_TYPE = reflect.TypeOf((*StringPattern)(nil)).Elem()
	FORMAT_INTERFACE_TYPE              = reflect.TypeOf((*Format)(nil)).Elem()
	IN_MEM_SNAPSHOTABLE                = reflect.TypeOf((*InMemorySnapshotable)(nil)).Elem()
	VALUEPATH_INTERFACE_TYPE           = reflect.TypeOf((*ValuePath)(nil)).Elem()

	OPTIONAL_PARAM_TYPE = reflect.TypeOf((*optionalParam)(nil)).Elem()

	ANY_READABLE = &AnyReadable{}
	ANY_READER   = &Reader{}

	SUPPORTED_PARSING_ERRORS = []parse.ParsingErrorKind{
		parse.UnterminatedMemberExpr, parse.UnterminatedDoubleColonExpr,
		parse.UnterminatedExtendStmt,
		parse.UnterminatedStructDefinition,
		parse.MissingBlock, parse.MissingFnBody,
		parse.MissingEqualsSignInDeclaration,
		parse.MissingObjectPropertyValue,
		parse.MissingObjectPatternProperty,
		parse.ExtractionExpressionExpected,
	}
)
View Source
var (
	ANY_EVENT       = utils.Must(NewEvent(ANY))
	EVENT_PROPNAMES = []string{"time", "value"}
)
View Source
var (
	INEXACT_OBJECT_WITH_A_ONE          = NewInexactObject(map[string]Serializable{"a": NewInt(1)}, nil, nil)
	READONLY_INEXACT_OBJECT_WITH_A_ONE = INEXACT_OBJECT_WITH_A_ONE.ReadonlyObject()

	ABS_DIR_PATH_EXAMPLE1 = NewPath("/dir/")
	ABS_DIR_PATH_EXAMPLE2 = NewPath("/dir/subdir/")

	REL_DIR_PATH_EXAMPLE1 = NewPath("./dir/")
	REL_DIR_PATH_EXAMPLE2 = NewPath("./dir/subdir/")

	ABS_FILE_PATH_EXAMPLE1 = NewPath("/file.json")
	ABS_FILE_PATH_EXAMPLE2 = NewPath("/dir/file.json")

	REL_FILE_PATH_EXAMPLE1 = NewPath("./file.json")
	REL_FILE_PATH_EXAMPLE2 = NewPath("./dir/file.json")

	PATH_EXAMPLES = []*Path{
		ABS_DIR_PATH_EXAMPLE1,
		ABS_DIR_PATH_EXAMPLE2,
		REL_DIR_PATH_EXAMPLE1,
		REL_DIR_PATH_EXAMPLE2,

		ABS_FILE_PATH_EXAMPLE1,
		ABS_FILE_PATH_EXAMPLE2,

		REL_FILE_PATH_EXAMPLE1,
		REL_FILE_PATH_EXAMPLE2,
	}
)
View Source
var (
	ANY_FORMAT = &AnyFormat{}

	ErrInvalidFormattingArgument = errors.New("invalid formatting argument")
)
View Source
var (
	ANY_INOX_FUNC = &InoxFunction{}
	ANY_FUNC      = &Function{}
)
View Source
var (
	GLOBAL_STATE_PROPNAMES = []string{"module"}

	ANY_GLOBAL_STATE = &GlobalState{}
)
View Source
var (
	VALUE_HISTORY_PROPNAMES = []string{"value_at", "forget_last", "last-value", "selected-datetime", "value-at-selection"}

	ANY_VALUE_HISTORY = &ValueHistory{}
)
View Source
var (
	ANY_ULID   = &ULID{}
	ANY_UUIDv4 = &UUIDv4{}
)
View Source
var (
	LIST_APPEND_PARAM_NAMES = []string{"values"}

	LIST_OF_SERIALIZABLES = NewListOf(ANY_SERIALIZABLE)
)
View Source
var (
	ANY_ITERABLE              = &AnyIterable{}
	ANY_SERIALIZABLE_ITERABLE = &AnySerializableIterable{}
)
View Source
var (
	ROUTINE_PROPNAMES       = []string{"wait_result", "cancel", "steps"}
	ROUTINE_GROUP_PROPNAMES = []string{"wait_results", "cancel_all"}
	EXECUTED_STEP_PROPNAMES = []string{"result", "end_time"}
	LTHREAD_SECTION_NAMES   = []string{LTHREAD_META_ALLOW_SECTION, LTHREAD_META_GLOBALS_SECTION, LTHREAD_META_GROUP_SECTION}

	ANY_LTHREAD       = &LThread{}
	ANY_LTHREAD_GROUP = &LThreadGroup{}
	ANY_EXECUTED_STEP = &ExecutedStep{}
)
View Source
var (
	ANY_MAPPING       = &Mapping{}
	MAPPING_PROPNAMES = []string{"compute"}
)
View Source
var (
	MODULE_PROP_NAMES      = []string{"parsing-errors", "main-chunk-node"}
	ANY_MODULE             = &Module{}
	SOURCE_POSITION_RECORD = NewInexactRecord(map[string]Serializable{
		"source": ANY_STR_LIKE,
		"line":   ANY_INT,
		"column": ANY_INT,
	}, nil)
)
View Source
var (
	ANY_MODULE_ARGS   = &ModuleArgs{}
	ANY_MODULE_PARAMS = &ModuleParamsPattern{}
)
View Source
var (
	ANY_NAMESPACE                 = &Namespace{}
	ANY_MUTABLE_ENTRIES_NAMESPACE = &Namespace{
		checkMutability: true,
		mutableEntries:  true,
	}
	ANY_IMMUTABLE_NAMESPACE = &Namespace{
		checkMutability: true,
		mutableEntries:  false,
	}
)
View Source
var (
	ANY_INTEGRAL = &AnyIntegral{}

	ANY_INT    = &Int{}
	INT_0      = NewInt(0)
	INT_1      = NewInt(1)
	INT_2      = NewInt(2)
	INT_3      = NewInt(3)
	INT_1_OR_2 = NewMultivalue(INT_1, INT_2)
	MAX_INT    = NewInt(math.MaxInt64)

	ANY_FLOAT = &Float{}
	MAX_FLOAT = NewFloat(math.MaxFloat64)
	FLOAT_0   = NewFloat(0)
	FLOAT_1   = NewFloat(1)
	FLOAT_2   = NewFloat(2)
	FLOAT_3   = NewFloat(3)
)
View Source
var (
	ANY_TYPE_PATTERN         = &TypePattern{}
	ANY_EXACT_VALUE_PATTERN  = &ExactValuePattern{value: ANY_SERIALIZABLE}
	ANY_PATTERN              = &AnyPattern{}
	ANY_SERIALIZABLE_PATTERN = &AnySerializablePattern{}
	ANY_PATH_PATTERN         = &PathPattern{
		dirConstraint: UnspecifiedDirOrFilePath,
		absoluteness:  UnspecifiedPathAbsoluteness,
	}
	ANY_NAMED_SEGMENT_PATH_PATTERN = &NamedSegmentPathPattern{}
	ANY_URL_PATTERN                = &URLPattern{}
	ANY_HOST_PATTERN               = &HostPattern{}
	ANY_STR_PATTERN                = &AnyStringPattern{}
	ANY_LIST_PATTERN               = &ListPattern{generalElement: ANY_SERIALIZABLE_PATTERN}
	ANY_TUPLE_PATTERN              = &TuplePattern{generalElement: ANY_SERIALIZABLE_PATTERN}

	ANY_OBJECT_PATTERN = &ObjectPattern{}
	ANY_RECORD_PATTERN = &RecordPattern{}
	ANY_OPTION_PATTERN = &OptionPattern{name: "", pattern: ANY_PATTERN}

	WIDEST_LIST_PATTERN  = NewListOf(ANY_SERIALIZABLE)
	WIDEST_TUPLE_PATTERN = NewTupleOf(ANY_SERIALIZABLE)

	ANY_DIR_PATH_PATTERN = &PathPattern{
		dirConstraint: DirPath,
	}
	ANY_NON_DIR_PATH_PATTERN = &PathPattern{
		dirConstraint: NonDirPath,
	}
	ANY_ABS_PATH_PATTERN = &PathPattern{
		absoluteness: AbsolutePath,
	}
	ANY_REL_PATH_PATTERN = &PathPattern{
		absoluteness: RelativePath,
	}
	ANY_ABS_DIR_PATH_PATTERN = &PathPattern{
		absoluteness:  AbsolutePath,
		dirConstraint: DirPath,
	}
	ANY_ABS_NON_DIR_PATH_PATTERN = &PathPattern{
		absoluteness:  AbsolutePath,
		dirConstraint: NonDirPath,
	}
	ANY_REL_DIR_PATH_PATTERN = &PathPattern{
		absoluteness:  RelativePath,
		dirConstraint: DirPath,
	}
	ANY_REL_NON_DIR_PATH_PATTERN = &PathPattern{
		absoluteness:  RelativePath,
		dirConstraint: NonDirPath,
	}

	ANY_HTTP_HOST_PATTERN  = &HostPattern{scheme: HTTP_SCHEME}
	ANY_HTTPS_HOST_PATTERN = &HostPattern{scheme: HTTPS_SCHEME}
	ANY_WS_HOST_PATTERN    = &HostPattern{scheme: WS_SCHEME}
	ANY_WSS_HOST_PATTERN   = &HostPattern{scheme: WSS_SCHEME}

	ANY_REGEX_PATTERN       = &RegexPattern{}
	ANY_INT_RANGE_PATTERN   = NewIntRangePattern(ANY_INT_RANGE)
	ANY_FLOAT_RANGE_PATTERN = NewFloatRangePattern(ANY_FLOAT_RANGE)
	ANY_EVENT_PATTERN       = &EventPattern{ValuePattern: ANY_PATTERN}
	ANY_MUTATION_PATTERN    = &MutationPattern{}

	ANY_FUNCTION_PATTERN = &FunctionPattern{}

	ANY_PATTERN_NAMESPACE = &PatternNamespace{}

	ErrPatternNotCallable                        = errors.New("pattern is not callable")
	ErrValueAlreadyInitialized                   = errors.New("value already initialized")
	ErrValueInExactPatternValueShouldBeImmutable = errors.New("the value in an exact value pattern should be immutable")

	HOST_PATTERN_PROPNAMES = []string{"scheme"}
)
View Source
var (
	ANY_SUBSCRIBER   = &AnySubscriber{}
	ANY_PUBLICATION  = &Publication{}
	ANY_SUBSCRIPTION = &Subscription{}
)
View Source
var (
	ANY_STREAM_SOURCE        = &AnyStreamSource{}
	READABLE_STREAM_ANY_ELEM = NewReadableStream(ANY)
)
View Source
var (
	ErrReadonlyValueCannotBeMutated = errors.New("readonly value cannot be mutated")
	ErrNotConvertibleToReadonly     = errors.New("not convertible to readonly")
)
View Source
var (
	ANY_MSG_RECEIVER     = &AnyMessageReceiver{}
	ANY_MSG              = &Message{}
	ANY_SYNC_MSG_HANDLER = &SynchronousMessageHandler{}

	MSG_PROPNAMES = []string{"data"}
)
View Source
var (
	WALK_ELEM = NewInexactObject(map[string]Serializable{
		"name":          &String{},
		"path":          &Path{},
		"is-dir":        ANY_BOOL,
		"is-regular":    ANY_BOOL,
		"is-walk-start": ANY_BOOL,
	}, nil, nil)

	ANY_PATH             = &Path{}
	ANY_DIR_PATH         = &Path{pattern: ANY_DIR_PATH_PATTERN}
	ANY_NON_DIR_PATH     = &Path{pattern: ANY_NON_DIR_PATH_PATTERN}
	ANY_ABS_PATH         = &Path{pattern: ANY_ABS_PATH_PATTERN}
	ANY_REL_PATH         = &Path{pattern: ANY_REL_PATH_PATTERN}
	ANY_ABS_DIR_PATH     = &Path{pattern: ANY_ABS_DIR_PATH_PATTERN}
	ANY_ABS_NON_DIR_PATH = &Path{pattern: ANY_ABS_NON_DIR_PATH_PATTERN}
	ANY_REL_DIR_PATH     = &Path{pattern: ANY_REL_DIR_PATH_PATTERN}
	ANY_REL_NON_DIR_PATH = &Path{pattern: ANY_REL_NON_DIR_PATH_PATTERN}
	ANY_URL              = &URL{}
	ANY_SCHEME           = &Scheme{}
	ANY_HOST             = &Host{}
	ANY_PORT             = &Port{}

	HTTP_SCHEME  = NewScheme("http")
	HTTPS_SCHEME = NewScheme("https")
	WS_SCHEME    = NewScheme("ws")
	WSS_SCHEME   = NewScheme("wss")

	ANY_HTTP_HOST  = NewHostMatchingPattern(ANY_HTTP_HOST_PATTERN)
	ANY_HTTPS_HOST = NewHostMatchingPattern(ANY_HTTPS_HOST_PATTERN)
	ANY_WS_HOST    = NewHostMatchingPattern(ANY_WS_HOST_PATTERN)
	ANY_WSS_HOST   = NewHostMatchingPattern(ANY_WSS_HOST_PATTERN)

	PATH_PROPNAMES = []string{"segments", "extension", "name", "dir", "ends-with-slash", "rel-equiv", "change_extension", "join"}
	URL_PROPNAMES  = []string{"scheme", "host", "path", "raw-query"}
	HOST_PROPNAMES = []string{"scheme", "explicit-port", "without-port"}
)
View Source
var (
	ANY_SNAPSHOT            = &Snapshot{}
	ANY_IN_MEM_SNAPSHOTABLE = &AnyInMemorySnapshotable{}
	SNAPSHOT_PROPNAMES      = []string{}
)
View Source
var (
	ANY_STRING         = &String{}
	ANY_CHECKED_STRING = &CheckedString{}
	ANY_STR_LIKE       = &AnyStringLike{}
	ANY_STR_CONCAT     = &StringConcatenation{}
	ANY_RUNE           = &Rune{}
	ANY_RUNE_SLICE     = &RuneSlice{}

	EMPTY_STRING = NewString("")

	STRING_LIKE_PSEUDOPROPS  = []string{"replace", "trim_space", "has_prefix", "has_suffix"}
	RUNE_SLICE_PROPNAMES     = []string{"insert", "remove_position", "remove_position_range"}
	CHECKED_STRING_PROPNAMES = []string{"pattern-name", "pattern"}
	RUNE_PROPNAMES           = []string{"is-space", "is-printable", "is-letter"}

	RUNE_SLICE__INSERT_PARAMS      = &[]Value{NewMultivalue(ANY_RUNE, NewAnySequenceOf(ANY_RUNE))}
	RUNE_SLICE__INSERT_PARAM_NAMES = []string{"rune", "index"}
)
View Source
var (
	ANY_EXACT_STR_PATTERN = &ExactStringPattern{} //this pattern does not match any string

	ANY_SEQ_STRING_PATTERN             = &SequenceStringPattern{}
	ANY_LENGTH_CHECKING_STRING_PATTERN = &LengthCheckingStringPattern{minLength: -1}
	ANY_INT_RANGE_STRING_PATTERN       = &IntRangeStringPattern{}
	ANY_FLOAT_RANGE_STRING_PATTERN     = &FloatRangeStringPattern{}
	ANY_PARSED_BASED_STRING_PATTERN    = &ParserBasedPattern{}
)
View Source
var (
	ANY_STRUCT_TYPE = &StructType{}
	ANY_STRUCT      = &Struct{typ: ANY_STRUCT_TYPE}
)
View Source
var (
	ANY_SYSTEM_GRAPH       = NewSystemGraph()
	ANY_SYSTEM_GRAPH_NODES = NewSystemGraphNodes()
	ANY_SYSTEM_GRAPH_NODE  = NewSystemGraphNode()
	ANY_SYSTEM_GRAPH_EVENT = NewSystemGraphEvent()
	ANY_SYSTEM_GRAPH_EDGE  = NewSystemGraphEdge()

	SYS_GRAPH_EVENT_TUPLE = NewTupleOf(ANY_SYSTEM_GRAPH_EVENT)
	SYS_GRAPH_EDGE_TUPLE  = NewTupleOf(ANY_SYSTEM_GRAPH_EDGE)

	SYSTEM_GRAPH_PROPNAMES       = []string{"nodes", "events"}
	SYSTEM_GRAPH_EVENT_PROPNAMES = []string{"text", "value0_id"}
	SYSTEM_GRAPH_NODE_PROPNAMES  = []string{"name", "type_name", "value_id", "edges"}
	SYSTEM_GRAP_EDGE_PROPNAMES   = []string{"text", "to"}
)
View Source
var (
	TEST_ITEM__EXPECTED_META_VALUE = NewMultivalue(ANY_STR_LIKE, NewExactObject(map[string]Serializable{
		TEST_ITEM_META__NAME_PROPNAME: ANY_STR_LIKE,

		TEST_ITEM_META__FS_PROPNAME:       ANY_FS_SNAPSHOT_IL,
		TEST_ITEM_META__PASS_LIVE_FS_COPY: ANY_BOOL,

		TEST_ITEM_META__PROGRAM_PROPNAME: ANY_ABS_NON_DIR_PATH,
		TEST_ITEM_META__MAIN_DB_SCHEMA:   ANY_OBJECT_PATTERN,
		TEST_ITEM_META__MAIN_DB_MIGRATIONS: NewInexactObject(
			map[string]Serializable{
				DB_MIGRATION__DELETIONS_PROP_NAME:       ANY_DICT,
				DB_MIGRATION__INCLUSIONS_PROP_NAME:      ANY_DICT,
				DB_MIGRATION__REPLACEMENTS_PROP_NAME:    ANY_DICT,
				DB_MIGRATION__INITIALIZATIONS_PROP_NAME: ANY_DICT,
			},

			map[string]struct{}{
				DB_MIGRATION__DELETIONS_PROP_NAME:       {},
				DB_MIGRATION__INCLUSIONS_PROP_NAME:      {},
				DB_MIGRATION__REPLACEMENTS_PROP_NAME:    {},
				DB_MIGRATION__INITIALIZATIONS_PROP_NAME: {},
			},
			nil,
		),
	}, nil, nil))

	ANY_TEST_SUITE = &TestSuite{}
	ANY_TEST_CASE  = &TestCase{}

	ANY_TESTED_PROGRAM_OR_NIL = NewMultivalue(ANY_TESTED_PROGRAM, Nil)
	ANY_TESTED_PROGRAM        = &TestedProgram{databases: ANY_MUTABLE_ENTRIES_NAMESPACE}

	ANY_CURRENT_TEST              = &CurrentTest{testedProgram: ANY_TESTED_PROGRAM_OR_NIL}
	ANY_CURRENT_TEST_WITH_PROGRAM = &CurrentTest{testedProgram: ANY_TESTED_PROGRAM}

	CURRENT_TEST_PROPNAMES   = []string{"program"}
	TESTED_PROGRAM_PROPNAMES = []string{"is-done", "cancel", "dbs"}
)
View Source
var (
	ErrWideSymbolicValue                   = errors.New("cannot create wide symbolic value")
	ErrNoSymbolicValue                     = errors.New("no symbolic value")
	ErrUnassignablePropsMixin              = errors.New("UnassignablePropsMixin")
	ErrMaximumSymbolicTestCallDepthReached = errors.New("maximum recursive Test() call depth reached, there is probably a cycle")

	ANY_TYPE           = &Type{}
	ANY                = &Any{}
	NEVER              = &Never{}
	ANY_BOOL           = &Bool{}
	TRUE               = NewBool(true)
	FALSE              = NewBool(false)
	ANY_RES_NAME       = &AnyResourceName{}
	ANY_OPTION         = &Option{name: "", value: ANY_SERIALIZABLE}
	ANY_INT_RANGE      = &IntRange{}
	ANY_FLOAT_RANGE    = &FloatRange{}
	ANY_RUNE_RANGE     = &RuneRange{}
	ANY_QUANTITY_RANGE = &QuantityRange{element: ANY_SERIALIZABLE}
	ANY_FILEMODE       = &FileMode{}

	ANY_TREEDATA = &Treedata{}

	ANY_YEAR     = &Year{}
	ANY_DATE     = &Date{}
	ANY_DATETIME = &DateTime{}
	ANY_DURATION = &Duration{}

	ANY_BYTECOUNT       = &ByteCount{}
	ANY_LINECOUNT       = &LineCount{}
	ANY_RUNECOUNT       = &RuneCount{}
	ANY_BYTERATE        = &ByteRate{}
	ANY_FREQUENCY       = &Frequency{}
	ANY_IDENTIFIER      = &Identifier{}
	ANY_PROPNAME        = &PropertyName{}
	ANY_LONG_VALUE_PATH = &LongValuePath{}
	ANY_VALUE_PATH      = &AnyValuePath{}
	ANY_EMAIL_ADDR      = &EmailAddress{}
	ANY_FILEINFO        = &FileInfo{}
	ANY_MIMETYPE        = &Mimetype{}

	FILEINFO_PROPNAMES   = []string{"name", "abs-path", "size", "mode", "mod-time", "is-dir"}
	EMAIL_ADDR_PROPNAMES = []string{"username", "domain"}
)
View Source
var (
	ANY_WALKABLE = &AnyWalkable{}
	ANY_WALKER   = &Walker{}
)
View Source
var (
	ANY_WATCHABLE = &AnyWatchable{}
	ANY_WATCHER   = &Watcher{}
)
View Source
var (
	ANY_COLOR = &Color{}
)
View Source
var (
	ANY_FS_SNAPSHOT_IL = &FilesystemSnapshotIL{}
)
View Source
var (
	ANY_MUTATION = &Mutation{}
)
View Source
var (
	ANY_POINTER = &Pointer{}
)
View Source
var (
	ANY_PROTOCOL_CLIENT = &AnyProtocolClient{}
)
View Source
var (
	ANY_RING_BUFFER = &RingBuffer{}
)
View Source
var (
	ANY_SEQ_OF_ANY = NewAnySequenceOf(ANY)
)
View Source
var (
	ANY_SERIALIZABLE = &AnySerializable{}
)
View Source
var (
	ANY_STREAM_SINK = &AnyStreamSink{}
)
View Source
var (
	ANY_WRITABLE = &AnyWritable{}
)
View Source
var (
	ANY_XML_ELEM = &XMLElement{}
)
View Source
var (
	BUILTIN_COMPTIME_TYPES = map[string]CompileTimeType{
		patternnames.BOOL:   &BoolType{baseValue: ANY_BOOL},
		patternnames.INT:    &IntType{baseValue: ANY_INT},
		patternnames.FLOAT:  &FloatType{baseValue: ANY_FLOAT},
		patternnames.STRING: &StringType{baseValue: ANY_STRING},
	}
)
View Source
var (
	DATA_CHUNK_PROPNAMES = []string{"data"}
)
View Source
var (
	ErrFailedToSnapshot = errors.New("failed to snapshot")
)
View Source
var (
	ErrMaxIntersectionComputationDepthExceeded = errors.New("mamximum intersection computation depth exceeded")
)
View Source
var (
	ErrMissingNodeValue = errors.New("missing node value")
)
View Source
var (
	ErrNotConcretizable = errors.New("not concretizable")
)
View Source
var (
	ErrRuntimeValuesNotSupported = errors.New("removing exact value patterns from pattern is not supported")
)
View Source
var Nil = &NilT{}
View Source
var (
	RING_BUFFER_PROPNAMES = []string{"write", "read"}
)
View Source
var (
	STATIC_CHECK_DATA_PROP_NAMES = []string{"errors", "warnings"}
)
View Source
var (
	STRINGIFY_PRETTY_PRINT_CONFIG = &pprint.PrettyPrintConfig{
		MaxDepth: 7,
		Colorize: false,
		Compact:  true,
	}
)

Functions

func Concretize

func Concretize(v Value, ctx ConcreteContext) (any, error)

func FmtCannotAssignPropertyOf

func FmtCannotAssignPropertyOf(v Value) string

func FmtElementError

func FmtElementError(index int, err error) error

func FmtGeneralElementError

func FmtGeneralElementError(err error) error

func FmtInvalidArg

func FmtInvalidArg(position int, actual, expected Value) string

func FmtPropertyError

func FmtPropertyError(name string, err error) error

func FmtPropertyPatternError

func FmtPropertyPatternError(name string, err error) error

func FormatErrPropertyDoesNotExist

func FormatErrPropertyDoesNotExist(name string, v Value) error

func GetAllPropertyNames

func GetAllPropertyNames(v IProps) []string

func HasRequiredOrOptionalProperty

func HasRequiredOrOptionalProperty(v IProps, name string) bool

func HasRequiredProperty

func HasRequiredProperty(v IProps, name string) bool

func HaveIntersection

func HaveIntersection(a, b Value) bool

work in progress

func ImplementsOrIsMultivalueWithAllValuesImplementing

func ImplementsOrIsMultivalueWithAllValuesImplementing[T Value](v Value) bool

func InitializeDictionary

func InitializeDictionary(d *Dictionary, entries map[string]Serializable, keys map[string]Serializable)

func InitializeListPatternElements

func InitializeListPatternElements(patt *ListPattern, elements []Pattern)

func InitializeListPatternGeneralElement

func InitializeListPatternGeneralElement(patt *ListPattern, element Pattern)

func InitializeObject

func InitializeObject(obj *Object, entries map[string]Serializable, static map[string]Pattern, shared bool)

func InitializeObjectPattern

func InitializeObjectPattern(patt *ObjectPattern, entries map[string]Pattern, optionalEntries map[string]struct{}, inexact bool)

func InitializeOrderedPair

func InitializeOrderedPair(pair *OrderedPair, first, second Serializable)

func InitializeRecordPattern

func InitializeRecordPattern(patt *RecordPattern, entries map[string]Pattern, optionalEntries map[string]struct{}, inexact bool)

func InitializeTuplePatternElements

func InitializeTuplePatternElements(patt *TuplePattern, elements []Pattern)

func InitializeTuplePatternGeneralElement

func InitializeTuplePatternGeneralElement(patt *TuplePattern, element Pattern)

func IsAny

func IsAny(val Value) bool

func IsAnyOrAnySerializable

func IsAnyOrAnySerializable(val Value) bool

func IsAnySerializable

func IsAnySerializable(val Value) bool

func IsConcretizable

func IsConcretizable(v Value) bool

func IsNameOfBuiltinComptimeType

func IsNameOfBuiltinComptimeType(name string) bool

func IsPropertyOptional

func IsPropertyOptional(v IProps, name string) bool

func IsReadonly

func IsReadonly(v Value) bool

func IsReadonlyOrImmutable

func IsReadonlyOrImmutable(v Value) bool

func IsSharable

func IsSharable(v Value) (bool, string)

func IsSharableOrClonable

func IsSharableOrClonable(v Value) (bool, string)

func IsShared

func IsShared(v Value) bool

func IsSimpleSymbolicInoxVal

func IsSimpleSymbolicInoxVal(v Value) bool

func PrettyPrint

func PrettyPrint(args PrettyPrintArgs) (regions pprint.Regions, err error)

func RegisterXMLInterpolationCheckingFunction

func RegisterXMLInterpolationCheckingFunction(factory any, fn XMLInterpolationCheckingFunction)

func SetExternalData

func SetExternalData(data ExternalData)

func Share

func Share[T PotentiallySharable](v T, originState *State) T

func Stringify

func Stringify(v Value) string

Stringify calls PrettyPrint on the passed value

func StringifyComptimeType

func StringifyComptimeType(t CompileTimeType) string

Stringify calls PrettyPrint on the passed value

func StringifyGetRegions

func StringifyGetRegions(v Value) (string, pprint.Regions)

func UnregisterXMLCheckingFunction

func UnregisterXMLCheckingFunction(factory any)

func ValidatePathOfValueInDatabase

func ValidatePathOfValueInDatabase[T ~string](pathOrPattern T) error

Validates the path (or path pattern) of a value/entity located in a database.

Types

type Any

type Any struct {
	// contains filtered or unexported fields
}

An Any represents a SymbolicValue we do not know the concrete type.

func (Any) IsMutable

func (any Any) IsMutable() bool

func (*Any) PrettyPrint

func (a *Any) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Any) Test

func (a *Any) Test(v Value, state RecTestCallState) bool

func (*Any) WidestOfType

func (a *Any) WidestOfType() Value

type AnyBytesLike

type AnyBytesLike struct {
	// contains filtered or unexported fields
}

A AnyBytesLike represents a symbolic BytesLike we don't know the concrete type.

func (*AnyBytesLike) Element

func (b *AnyBytesLike) Element() Value

func (*AnyBytesLike) ElementAt

func (b *AnyBytesLike) ElementAt(i int) Value

func (*AnyBytesLike) GetOrBuildBytes

func (b *AnyBytesLike) GetOrBuildBytes() *ByteSlice

func (*AnyBytesLike) HasKnownLen

func (b *AnyBytesLike) HasKnownLen() bool

func (AnyBytesLike) IsMutable

func (any AnyBytesLike) IsMutable() bool

func (*AnyBytesLike) IteratorElementKey

func (b *AnyBytesLike) IteratorElementKey() Value

func (*AnyBytesLike) IteratorElementValue

func (b *AnyBytesLike) IteratorElementValue() Value

func (*AnyBytesLike) KnownLen

func (b *AnyBytesLike) KnownLen() int

func (*AnyBytesLike) PrettyPrint

func (b *AnyBytesLike) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*AnyBytesLike) Reader

func (b *AnyBytesLike) Reader() *Reader

func (*AnyBytesLike) SetSlice

func (c *AnyBytesLike) SetSlice(ctx *Context, start, end *Int, v Sequence)

func (*AnyBytesLike) Test

func (b *AnyBytesLike) Test(v Value, state RecTestCallState) bool

func (*AnyBytesLike) WidestOfType

func (b *AnyBytesLike) WidestOfType() Value

type AnyContainer

type AnyContainer struct {
	SerializableMixin
	// contains filtered or unexported fields
}

An AnyContainer represents a symbolic Iterable we do not know the concrete type.

func (*AnyContainer) Contains

func (*AnyContainer) Contains(value Serializable) (yes bool, possible bool)

func (AnyContainer) IsMutable

func (any AnyContainer) IsMutable() bool

func (*AnyContainer) IteratorElementKey

func (*AnyContainer) IteratorElementKey() Value

func (*AnyContainer) IteratorElementValue

func (*AnyContainer) IteratorElementValue() Value

func (*AnyContainer) PrettyPrint

func (*AnyContainer) Test

func (*AnyContainer) Test(v Value, state RecTestCallState) bool

func (*AnyContainer) WidestOfType

func (*AnyContainer) WidestOfType() Value

type AnyFormat

type AnyFormat struct {
	NotCallablePatternMixin
	SerializableMixin
}

An AnyFormat represents a symbolic Pattern we do not know the concrete type.

func (*AnyFormat) Format

func (p *AnyFormat) Format(v Value) error

func (*AnyFormat) HasUnderlyingPattern

func (p *AnyFormat) HasUnderlyingPattern() bool

func (*AnyFormat) IsMutable

func (f *AnyFormat) IsMutable() bool

func (*AnyFormat) IteratorElementKey

func (p *AnyFormat) IteratorElementKey() Value

func (*AnyFormat) IteratorElementValue

func (p *AnyFormat) IteratorElementValue() Value

func (*AnyFormat) PrettyPrint

func (p *AnyFormat) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*AnyFormat) StringPattern

func (p *AnyFormat) StringPattern() (StringPattern, bool)

func (*AnyFormat) SymbolicValue

func (p *AnyFormat) SymbolicValue() Value

func (*AnyFormat) Test

func (p *AnyFormat) Test(v Value, state RecTestCallState) bool

func (*AnyFormat) TestValue

func (p *AnyFormat) TestValue(Value, RecTestCallState) bool

func (*AnyFormat) WidestOfType

func (p *AnyFormat) WidestOfType() Value

type AnyInMemorySnapshotable

type AnyInMemorySnapshotable struct {
	// contains filtered or unexported fields
}

An AnyInMemorySnapshotable represents a symbolic InMemorySnapshotable we do not know the concrete type.

func (*AnyInMemorySnapshotable) IsMutable

func (*AnyInMemorySnapshotable) IsMutable() bool

func (*AnyInMemorySnapshotable) PrettyPrint

func (*AnyInMemorySnapshotable) TakeInMemorySnapshot

func (s *AnyInMemorySnapshotable) TakeInMemorySnapshot() (*Snapshot, error)

func (*AnyInMemorySnapshotable) Test

func (*AnyInMemorySnapshotable) WatcherElement

func (s *AnyInMemorySnapshotable) WatcherElement() Value

func (*AnyInMemorySnapshotable) WidestOfType

func (s *AnyInMemorySnapshotable) WidestOfType() Value

type AnyIndexable

type AnyIndexable struct {
	// contains filtered or unexported fields
}

An AnyIndexable represents a symbolic Indesable we do not know the concrete type.

func (*AnyIndexable) Element

func (i *AnyIndexable) Element() Value

func (*AnyIndexable) ElementAt

func (i *AnyIndexable) ElementAt(index int) Value

func (*AnyIndexable) HasKnownLen

func (i *AnyIndexable) HasKnownLen() bool

func (AnyIndexable) IsMutable

func (any AnyIndexable) IsMutable() bool

func (*AnyIndexable) IteratorElementKey

func (i *AnyIndexable) IteratorElementKey() Value

func (*AnyIndexable) IteratorElementValue

func (i *AnyIndexable) IteratorElementValue() Value

func (*AnyIndexable) KnownLen

func (i *AnyIndexable) KnownLen() int

func (*AnyIndexable) PrettyPrint

func (r *AnyIndexable) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*AnyIndexable) Test

func (r *AnyIndexable) Test(v Value, state RecTestCallState) bool

func (*AnyIndexable) WidestOfType

func (r *AnyIndexable) WidestOfType() Value

type AnyIntegral

type AnyIntegral struct {
	// contains filtered or unexported fields
}

An AnyIntegral represents a symbolic Integral we do not know the concrete type.

func (*AnyIntegral) Int64

func (*AnyIntegral) Int64() (i *Int, signed bool)

func (AnyIntegral) IsMutable

func (any AnyIntegral) IsMutable() bool

func (*AnyIntegral) IteratorElementKey

func (*AnyIntegral) IteratorElementKey() Value

func (*AnyIntegral) IteratorElementValue

func (*AnyIntegral) IteratorElementValue() Value

func (*AnyIntegral) PrettyPrint

func (*AnyIntegral) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*AnyIntegral) Test

func (*AnyIntegral) Test(v Value, state RecTestCallState) bool

func (*AnyIntegral) WidestOfType

func (*AnyIntegral) WidestOfType() Value

type AnyIterable

type AnyIterable struct {
	// contains filtered or unexported fields
}

An AnyIterable represents a symbolic Iterable we do not know the concrete type.

func (AnyIterable) IsMutable

func (any AnyIterable) IsMutable() bool

func (*AnyIterable) IteratorElementKey

func (*AnyIterable) IteratorElementKey() Value

func (*AnyIterable) IteratorElementValue

func (*AnyIterable) IteratorElementValue() Value

func (*AnyIterable) PrettyPrint

func (*AnyIterable) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*AnyIterable) Test

func (*AnyIterable) Test(v Value, state RecTestCallState) bool

func (*AnyIterable) WidestOfType

func (*AnyIterable) WidestOfType() Value

type AnyMessageReceiver

type AnyMessageReceiver struct {
	// contains filtered or unexported fields
}

An AnyMessageReceiver represents a symbolic MessageReceiver we do not know the concrete type.

func (AnyMessageReceiver) IsMutable

func (any AnyMessageReceiver) IsMutable() bool

func (*AnyMessageReceiver) PrettyPrint

func (*AnyMessageReceiver) ReceiveMessage

func (r *AnyMessageReceiver) ReceiveMessage(Value) error

func (*AnyMessageReceiver) Test

func (r *AnyMessageReceiver) Test(v Value, state RecTestCallState) bool

func (*AnyMessageReceiver) WidestOfType

func (r *AnyMessageReceiver) WidestOfType() Value

type AnyPattern

type AnyPattern struct {
	NotCallablePatternMixin
	SerializableMixin
}

An AnyPattern represents a symbolic Pattern we do not know the concrete type.

func (*AnyPattern) HasUnderlyingPattern

func (p *AnyPattern) HasUnderlyingPattern() bool

func (AnyPattern) IsMutable

func (any AnyPattern) IsMutable() bool

func (*AnyPattern) IteratorElementKey

func (p *AnyPattern) IteratorElementKey() Value

func (*AnyPattern) IteratorElementValue

func (p *AnyPattern) IteratorElementValue() Value

func (*AnyPattern) PrettyPrint

func (p *AnyPattern) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*AnyPattern) StringPattern

func (p *AnyPattern) StringPattern() (StringPattern, bool)

func (*AnyPattern) SymbolicValue

func (p *AnyPattern) SymbolicValue() Value

func (*AnyPattern) Test

func (p *AnyPattern) Test(v Value, state RecTestCallState) bool

func (*AnyPattern) TestValue

func (p *AnyPattern) TestValue(Value, RecTestCallState) bool

func (*AnyPattern) WidestOfType

func (p *AnyPattern) WidestOfType() Value

type AnyProtocolClient

type AnyProtocolClient struct {
	// contains filtered or unexported fields
}

An AnyProtocolClient represents a symbolic Iterable we do not know the concrete type.

func (*AnyProtocolClient) IsMutable

func (c *AnyProtocolClient) IsMutable() bool

func (*AnyProtocolClient) PrettyPrint

func (*AnyProtocolClient) Schemes

func (*AnyProtocolClient) Schemes() []string

func (*AnyProtocolClient) Test

func (r *AnyProtocolClient) Test(v Value, state RecTestCallState) bool

func (*AnyProtocolClient) WidestOfType

func (r *AnyProtocolClient) WidestOfType() Value

type AnyReadable

type AnyReadable struct {
	// contains filtered or unexported fields
}

An AnyReadable represents a symbolic Readable we do not know the concrete type.

func (AnyReadable) IsMutable

func (any AnyReadable) IsMutable() bool

func (*AnyReadable) PrettyPrint

func (r *AnyReadable) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*AnyReadable) Reader

func (r *AnyReadable) Reader() *Reader

func (*AnyReadable) Test

func (r *AnyReadable) Test(v Value, state RecTestCallState) bool

func (*AnyReadable) WidestOfType

func (r *AnyReadable) WidestOfType() Value

type AnyResourceName

type AnyResourceName struct {
	// contains filtered or unexported fields
}

func (AnyResourceName) IsMutable

func (any AnyResourceName) IsMutable() bool

func (*AnyResourceName) PrettyPrint

func (*AnyResourceName) ResourceName

func (r *AnyResourceName) ResourceName() *String

func (*AnyResourceName) Test

func (r *AnyResourceName) Test(v Value, state RecTestCallState) bool

func (*AnyResourceName) WidestOfType

func (r *AnyResourceName) WidestOfType() Value

type AnySequenceOf

type AnySequenceOf struct {
	// contains filtered or unexported fields
}

func NewAnySequenceOf

func NewAnySequenceOf(elem Value) *AnySequenceOf

func (*AnySequenceOf) Element

func (s *AnySequenceOf) Element() Value

func (*AnySequenceOf) ElementAt

func (s *AnySequenceOf) ElementAt(i int) Value

func (*AnySequenceOf) HasKnownLen

func (*AnySequenceOf) HasKnownLen() bool

func (*AnySequenceOf) IsMutable

func (*AnySequenceOf) IsMutable() bool

func (*AnySequenceOf) IteratorElementKey

func (*AnySequenceOf) IteratorElementKey() Value

func (*AnySequenceOf) IteratorElementValue

func (s *AnySequenceOf) IteratorElementValue() Value

func (*AnySequenceOf) KnownLen

func (*AnySequenceOf) KnownLen() int

func (*AnySequenceOf) PrettyPrint

func (s *AnySequenceOf) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*AnySequenceOf) Test

func (s *AnySequenceOf) Test(v Value, state RecTestCallState) bool

func (*AnySequenceOf) WidestOfType

func (*AnySequenceOf) WidestOfType() Value

type AnySerializable

type AnySerializable struct {
	SerializableMixin
}

func (*AnySerializable) IsMutable

func (*AnySerializable) IsMutable() bool

func (*AnySerializable) PrettyPrint

func (*AnySerializable) Test

func (*AnySerializable) Test(v Value, state RecTestCallState) bool

func (*AnySerializable) WidestOfType

func (*AnySerializable) WidestOfType() Value

type AnySerializableIterable

type AnySerializableIterable struct {
	SerializableMixin
	// contains filtered or unexported fields
}

An AnySerializableIterable represents a symbolic Iterable+Serializable we do not know the concrete type.

func (AnySerializableIterable) IsMutable

func (any AnySerializableIterable) IsMutable() bool

func (*AnySerializableIterable) IteratorElementKey

func (r *AnySerializableIterable) IteratorElementKey() Value

func (*AnySerializableIterable) IteratorElementValue

func (r *AnySerializableIterable) IteratorElementValue() Value

func (*AnySerializableIterable) PrettyPrint

func (*AnySerializableIterable) Test

func (*AnySerializableIterable) WidestOfType

func (r *AnySerializableIterable) WidestOfType() Value

type AnySerializablePattern

type AnySerializablePattern struct {
	NotCallablePatternMixin
	SerializableMixin
}

An AnySerializablePattern represents a symbolic Pattern we do not know the concrete type that represents patterns of serializable values.

func (*AnySerializablePattern) HasUnderlyingPattern

func (p *AnySerializablePattern) HasUnderlyingPattern() bool

func (AnySerializablePattern) IsMutable

func (any AnySerializablePattern) IsMutable() bool

func (*AnySerializablePattern) IteratorElementKey

func (p *AnySerializablePattern) IteratorElementKey() Value

func (*AnySerializablePattern) IteratorElementValue

func (p *AnySerializablePattern) IteratorElementValue() Value

func (*AnySerializablePattern) PrettyPrint

func (*AnySerializablePattern) StringPattern

func (p *AnySerializablePattern) StringPattern() (StringPattern, bool)

func (*AnySerializablePattern) SymbolicValue

func (p *AnySerializablePattern) SymbolicValue() Value

func (*AnySerializablePattern) Test

func (*AnySerializablePattern) TestValue

func (*AnySerializablePattern) WidestOfType

func (p *AnySerializablePattern) WidestOfType() Value

type AnyStreamSink

type AnyStreamSink struct {
	// contains filtered or unexported fields
}

An AnyStreamSink represents a symbolic StreamSink we do not know the concrete type.

func (*AnyStreamSink) ChunkedWritableStreamElement

func (r *AnyStreamSink) ChunkedWritableStreamElement() Value

func (AnyStreamSink) IsMutable

func (any AnyStreamSink) IsMutable() bool

func (*AnyStreamSink) PrettyPrint

func (r *AnyStreamSink) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*AnyStreamSink) Test

func (r *AnyStreamSink) Test(v Value, state RecTestCallState) bool

func (*AnyStreamSink) WidestOfType

func (r *AnyStreamSink) WidestOfType() Value

func (*AnyStreamSink) WritableStreamElement

func (r *AnyStreamSink) WritableStreamElement() Value

type AnyStreamSource

type AnyStreamSource struct {
	// contains filtered or unexported fields
}

An AnyStreamSource represents a symbolic StreamSource we do not know the concrete type.

func (*AnyStreamSource) ChunkedStreamElement

func (r *AnyStreamSource) ChunkedStreamElement() Value

func (AnyStreamSource) IsMutable

func (any AnyStreamSource) IsMutable() bool

func (*AnyStreamSource) PrettyPrint

func (*AnyStreamSource) StreamElement

func (r *AnyStreamSource) StreamElement() Value

func (*AnyStreamSource) Test

func (r *AnyStreamSource) Test(v Value, state RecTestCallState) bool

func (*AnyStreamSource) WidestOfType

func (r *AnyStreamSource) WidestOfType() Value

type AnyStringLike

type AnyStringLike struct {
	UnassignablePropsMixin
	Serializable
}

A AnyStringLike represents a symbolic StringLike we don't know the concret type.

func (*AnyStringLike) Element

func (s *AnyStringLike) Element() Value

func (*AnyStringLike) ElementAt

func (s *AnyStringLike) ElementAt(i int) Value

func (*AnyStringLike) GetOrBuildString

func (s *AnyStringLike) GetOrBuildString() *String

func (*AnyStringLike) HasKnownLen

func (s *AnyStringLike) HasKnownLen() bool

func (AnyStringLike) IsMutable

func (any AnyStringLike) IsMutable() bool

func (*AnyStringLike) IteratorElementKey

func (s *AnyStringLike) IteratorElementKey() Value

func (*AnyStringLike) IteratorElementValue

func (s *AnyStringLike) IteratorElementValue() Value

func (*AnyStringLike) KnownLen

func (s *AnyStringLike) KnownLen() int

func (*AnyStringLike) PrettyPrint

func (s *AnyStringLike) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*AnyStringLike) Prop

func (s *AnyStringLike) Prop(name string) Value

func (*AnyStringLike) PropertyNames

func (p *AnyStringLike) PropertyNames() []string

func (*AnyStringLike) Reader

func (s *AnyStringLike) Reader() *Reader

func (*AnyStringLike) Test

func (s *AnyStringLike) Test(v Value, state RecTestCallState) bool

func (*AnyStringLike) WidestOfType

func (s *AnyStringLike) WidestOfType() Value

type AnyStringPattern

type AnyStringPattern struct {
	NotCallablePatternMixin
	SerializableMixin
}

An AnyStringPattern represents a symbolic StringPatternElement we dont know the concrete type.

func (*AnyStringPattern) HasRegex

func (p *AnyStringPattern) HasRegex() bool

func (*AnyStringPattern) HasUnderlyingPattern

func (p *AnyStringPattern) HasUnderlyingPattern() bool

func (AnyStringPattern) IsMutable

func (any AnyStringPattern) IsMutable() bool

func (*AnyStringPattern) IteratorElementKey

func (p *AnyStringPattern) IteratorElementKey() Value

func (*AnyStringPattern) IteratorElementValue

func (p *AnyStringPattern) IteratorElementValue() Value

func (*AnyStringPattern) MatchGroups

func (p *AnyStringPattern) MatchGroups(v Value) (bool, map[string]Value)

func (*AnyStringPattern) PrettyPrint

func (*AnyStringPattern) StringPattern

func (p *AnyStringPattern) StringPattern() (StringPattern, bool)

func (*AnyStringPattern) SymbolicValue

func (p *AnyStringPattern) SymbolicValue() Value

func (*AnyStringPattern) Test

func (p *AnyStringPattern) Test(v Value, state RecTestCallState) bool

func (*AnyStringPattern) TestValue

func (p *AnyStringPattern) TestValue(v Value, state RecTestCallState) bool

func (*AnyStringPattern) WidestOfType

func (p *AnyStringPattern) WidestOfType() Value

type AnySubscriber

type AnySubscriber struct {
	// contains filtered or unexported fields
}

An AnySubscriber represents a symbolic Subscriber we do not know the concrete type.

func (*AnySubscriber) IsMutable

func (*AnySubscriber) IsMutable() bool

func (*AnySubscriber) PrettyPrint

func (r *AnySubscriber) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*AnySubscriber) ReceivePublication

func (r *AnySubscriber) ReceivePublication(Value) error

func (*AnySubscriber) Test

func (r *AnySubscriber) Test(v Value, state RecTestCallState) bool

func (*AnySubscriber) WidestOfType

func (r *AnySubscriber) WidestOfType() Value

type AnyValuePath

type AnyValuePath struct {
}

AnyValuePath represents a ValuePath we don't know the concrete type.

func (*AnyValuePath) GetFrom

func (p *AnyValuePath) GetFrom(v Value) (result Value, alwaysPresent bool, err error)

func (AnyValuePath) IsMutable

func (p AnyValuePath) IsMutable() bool

func (*AnyValuePath) PrettyPrint

func (p *AnyValuePath) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*AnyValuePath) Test

func (p *AnyValuePath) Test(v Value, state RecTestCallState) bool

func (*AnyValuePath) WidestOfType

func (p *AnyValuePath) WidestOfType() Value

type AnyWalkable

type AnyWalkable struct {
	// contains filtered or unexported fields
}

An AnyWalkable represents a symbolic Walkable we do not know the concrete type.

func (AnyWalkable) IsMutable

func (any AnyWalkable) IsMutable() bool

func (*AnyWalkable) PrettyPrint

func (r *AnyWalkable) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*AnyWalkable) Test

func (r *AnyWalkable) Test(v Value, state RecTestCallState) bool

func (*AnyWalkable) WalkerElement

func (r *AnyWalkable) WalkerElement() Value

func (*AnyWalkable) WidestOfType

func (r *AnyWalkable) WidestOfType() Value

type AnyWatchable

type AnyWatchable struct {
	// contains filtered or unexported fields
}

An AnyWatchable represents a symbolic Watchable we do not know the concrete type.

func (AnyWatchable) IsMutable

func (any AnyWatchable) IsMutable() bool

func (*AnyWatchable) PrettyPrint

func (r *AnyWatchable) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*AnyWatchable) Test

func (r *AnyWatchable) Test(v Value, state RecTestCallState) bool

func (*AnyWatchable) WatcherElement

func (r *AnyWatchable) WatcherElement() Value

func (*AnyWatchable) WidestOfType

func (r *AnyWatchable) WidestOfType() Value

type AnyWritable

type AnyWritable struct {
	// contains filtered or unexported fields
}

An AnyWritable represents a symbolic Writable we do not know the concrete type.

func (AnyWritable) IsMutable

func (any AnyWritable) IsMutable() bool

func (*AnyWritable) PrettyPrint

func (r *AnyWritable) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*AnyWritable) Test

func (r *AnyWritable) Test(v Value, state RecTestCallState) bool

func (*AnyWritable) WidestOfType

func (r *AnyWritable) WidestOfType() Value

func (*AnyWritable) Writer

func (r *AnyWritable) Writer() *Writer

type ApiIL

type ApiIL struct {
	UnassignablePropsMixin
	// contains filtered or unexported fields
}

A ApiIL represents a symbolic ApiIL.

func NewApiIL

func NewApiIL(schema *ObjectPattern) *ApiIL

func (*ApiIL) Close

func (ApiIL *ApiIL) Close(*Context) *Error

func (*ApiIL) GetGoMethod

func (api *ApiIL) GetGoMethod(name string) (*GoFunction, bool)

func (*ApiIL) IsMutable

func (*ApiIL) IsMutable() bool

func (*ApiIL) PrettyPrint

func (r *ApiIL) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*ApiIL) Prop

func (api *ApiIL) Prop(name string) Value

func (*ApiIL) PropertyNames

func (db *ApiIL) PropertyNames() []string

func (*ApiIL) Test

func (api *ApiIL) Test(v Value, state RecTestCallState) bool

func (*ApiIL) UpdateSchema

func (ApiIL *ApiIL) UpdateSchema(ctx *Context, schema *ObjectPattern) *Error

func (*ApiIL) WidestOfType

func (api *ApiIL) WidestOfType() Value

type Array

type Array struct {
	// contains filtered or unexported fields
}

An Array represents a symbolic Array.

func NewArray

func NewArray(elements ...Value) *Array

func NewArrayOf

func NewArrayOf(generalElement Value) *Array

func (*Array) Element

func (a *Array) Element() Value

func (*Array) ElementAt

func (a *Array) ElementAt(i int) Value

func (*Array) HasKnownLen

func (a *Array) HasKnownLen() bool

func (*Array) IsMutable

func (*Array) IsMutable() bool

func (*Array) IteratorElementKey

func (a *Array) IteratorElementKey() Value

func (*Array) IteratorElementValue

func (a *Array) IteratorElementValue() Value

func (*Array) KnownLen

func (a *Array) KnownLen() int

func (*Array) PrettyPrint

func (a *Array) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Array) Test

func (a *Array) Test(v Value, state RecTestCallState) bool

func (*Array) WidestOfType

func (*Array) WidestOfType() Value

type AstNode

type AstNode struct {
	Node parse.Node

	UnassignablePropsMixin
}

An AstNode represents a symbolic AstNode.

func (AstNode) IsMutable

func (n AstNode) IsMutable() bool

func (*AstNode) PrettyPrint

func (n *AstNode) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*AstNode) Prop

func (r *AstNode) Prop(name string) Value

func (*AstNode) PropertyNames

func (*AstNode) PropertyNames() []string

func (*AstNode) Test

func (n *AstNode) Test(v Value, state RecTestCallState) bool

func (*AstNode) WidestOfType

func (n *AstNode) WidestOfType() Value

type Bool

type Bool struct {
	SerializableMixin
	// contains filtered or unexported fields
}

A Bool represents a symbolic Bool.

func NewBool

func NewBool(v bool) *Bool

func (*Bool) Concretize

func (b *Bool) Concretize(ctx ConcreteContext) any

func (*Bool) IsConcretizable

func (b *Bool) IsConcretizable() bool

func (Bool) IsMutable

func (boolean Bool) IsMutable() bool

func (*Bool) PrettyPrint

func (b *Bool) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Bool) Static

func (b *Bool) Static() Pattern

func (*Bool) Test

func (b *Bool) Test(v Value, state RecTestCallState) bool

func (*Bool) WidestOfType

func (b *Bool) WidestOfType() Value

type BoolType

type BoolType struct {
	// contains filtered or unexported fields
}

func (*BoolType) Equal

func (t *BoolType) Equal(v CompileTimeType, state RecTestCallState) bool

func (*BoolType) PrettyPrint

func (t *BoolType) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*BoolType) SymbolicValue

func (t *BoolType) SymbolicValue() Value

func (*BoolType) TestValue

func (t *BoolType) TestValue(v Value, state RecTestCallState) bool

type Byte

type Byte struct {
	SerializableMixin
	ComparableMixin
}

A Byte represents a symbolic Byte.

func (*Byte) Int64

func (b *Byte) Int64() (i *Int, signed bool)

func (Byte) IsMutable

func (b Byte) IsMutable() bool

func (*Byte) PrettyPrint

func (b *Byte) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Byte) Static

func (b *Byte) Static() Pattern

func (*Byte) Test

func (b *Byte) Test(v Value, state RecTestCallState) bool

func (*Byte) WidestOfType

func (b *Byte) WidestOfType() Value

type ByteCount

type ByteCount struct {
	SerializableMixin
	ComparableMixin
	// contains filtered or unexported fields
}

A ByteCount represents a symbolic ByteCount.

func NewByteCount

func NewByteCount(v int64) *ByteCount

func (*ByteCount) Concretize

func (c *ByteCount) Concretize(ctx ConcreteContext) any

func (*ByteCount) Int64

func (c *ByteCount) Int64() (i *Int, signed bool)

func (*ByteCount) IsConcretizable

func (c *ByteCount) IsConcretizable() bool

func (ByteCount) IsMutable

func (count ByteCount) IsMutable() bool

func (*ByteCount) PrettyPrint

func (c *ByteCount) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*ByteCount) Static

func (c *ByteCount) Static() Pattern

func (*ByteCount) Test

func (c *ByteCount) Test(v Value, state RecTestCallState) bool

func (*ByteCount) WidestOfType

func (c *ByteCount) WidestOfType() Value

type ByteRate

type ByteRate struct {
	SerializableMixin
	ComparableMixin
	// contains filtered or unexported fields
}

A ByteRate represents a symbolic ByteRate.

func NewByteRate

func NewByteRate(v int64) *ByteRate

func (*ByteRate) Concretize

func (r *ByteRate) Concretize(ctx ConcreteContext) any

func (*ByteRate) IsConcretizable

func (r *ByteRate) IsConcretizable() bool

func (ByteRate) IsMutable

func (rate ByteRate) IsMutable() bool

func (*ByteRate) PrettyPrint

func (r *ByteRate) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*ByteRate) Static

func (r *ByteRate) Static() Pattern

func (*ByteRate) Test

func (c *ByteRate) Test(v Value, state RecTestCallState) bool

func (*ByteRate) WidestOfType

func (r *ByteRate) WidestOfType() Value

type ByteSlice

type ByteSlice struct {
	SerializableMixin
	ClonableSerializableMixin
	// contains filtered or unexported fields
}

A ByteSlice represents a symbolic ByteSlice.

func NewByteSlice

func NewByteSlice() *ByteSlice

func (*ByteSlice) Concretize

func (s *ByteSlice) Concretize(ctx ConcreteContext) any

func (*ByteSlice) Element

func (s *ByteSlice) Element() Value

func (*ByteSlice) ElementAt

func (*ByteSlice) ElementAt(i int) Value

func (*ByteSlice) GetOrBuildBytes

func (s *ByteSlice) GetOrBuildBytes() *ByteSlice

func (*ByteSlice) HasKnownLen

func (s *ByteSlice) HasKnownLen() bool

func (*ByteSlice) IsConcretizable

func (s *ByteSlice) IsConcretizable() bool

func (*ByteSlice) IsMutable

func (slice *ByteSlice) IsMutable() bool

func (*ByteSlice) IteratorElementKey

func (s *ByteSlice) IteratorElementKey() Value

func (*ByteSlice) IteratorElementValue

func (s *ByteSlice) IteratorElementValue() Value

func (*ByteSlice) KnownLen

func (s *ByteSlice) KnownLen() int

func (*ByteSlice) PrettyPrint

func (s *ByteSlice) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*ByteSlice) Reader

func (s *ByteSlice) Reader() *Reader

func (*ByteSlice) SetSlice

func (s *ByteSlice) SetSlice(ctx *Context, start, end *Int, v Sequence)

func (*ByteSlice) Test

func (s *ByteSlice) Test(v Value, state RecTestCallState) bool

func (*ByteSlice) WatcherElement

func (s *ByteSlice) WatcherElement() Value

func (*ByteSlice) WidestOfType

func (s *ByteSlice) WidestOfType() Value

type Bytecode

type Bytecode struct {
	Bytecode any //if nil, any function is matched
}

func (*Bytecode) IsMutable

func (b *Bytecode) IsMutable() bool

func (*Bytecode) PrettyPrint

func (b *Bytecode) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Bytecode) Test

func (b *Bytecode) Test(v Value, state RecTestCallState) bool

func (*Bytecode) WidestOfType

func (b *Bytecode) WidestOfType() Value

type BytesConcatenation

type BytesConcatenation struct {
	// contains filtered or unexported fields
}

A BytesConcatenation represents a symbolic BytesConcatenation.

func (*BytesConcatenation) Element

func (s *BytesConcatenation) Element() Value

func (*BytesConcatenation) ElementAt

func (*BytesConcatenation) ElementAt(i int) Value

func (*BytesConcatenation) GetOrBuildBytes

func (c *BytesConcatenation) GetOrBuildBytes() *ByteSlice

func (*BytesConcatenation) HasKnownLen

func (c *BytesConcatenation) HasKnownLen() bool

func (*BytesConcatenation) IsMutable

func (c *BytesConcatenation) IsMutable() bool

func (*BytesConcatenation) IteratorElementKey

func (c *BytesConcatenation) IteratorElementKey() Value

func (*BytesConcatenation) IteratorElementValue

func (c *BytesConcatenation) IteratorElementValue() Value

func (*BytesConcatenation) KnownLen

func (s *BytesConcatenation) KnownLen() int

func (*BytesConcatenation) PrettyPrint

func (*BytesConcatenation) Reader

func (c *BytesConcatenation) Reader() *Reader

func (*BytesConcatenation) SetSlice

func (c *BytesConcatenation) SetSlice(ctx *Context, start, end *Int, v Sequence)

func (*BytesConcatenation) Test

func (c *BytesConcatenation) Test(v Value, state RecTestCallState) bool

func (*BytesConcatenation) WidestOfType

func (c *BytesConcatenation) WidestOfType() Value

type BytesLike

type BytesLike interface {
	MutableSequence
	Iterable
	GetOrBuildBytes() *ByteSlice
}

A BytesLike represents a symbolic BytesLike.

type CheckedString

type CheckedString struct {
	// contains filtered or unexported fields
}

A CheckedString represents a symbolic CheckedString.

func (CheckedString) IsMutable

func (str CheckedString) IsMutable() bool

func (*CheckedString) PrettyPrint

func (s *CheckedString) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*CheckedString) Prop

func (s *CheckedString) Prop(name string) Value

func (*CheckedString) PropertyNames

func (p *CheckedString) PropertyNames() []string

func (*CheckedString) Test

func (s *CheckedString) Test(v Value, state RecTestCallState) bool

func (*CheckedString) WidestOfType

func (s *CheckedString) WidestOfType() Value

type ClonableSerializable

type ClonableSerializable interface {
	Serializable
	// contains filtered or unexported methods
}

type ClonableSerializableMixin

type ClonableSerializableMixin struct {
}

type Collection

type Collection interface {
	Container
	// contains filtered or unexported methods
}

type CollectionMixin

type CollectionMixin struct {
}

type Color

type Color struct {
	UnassignablePropsMixin
	// contains filtered or unexported fields
}

A Color represents a symbolic Color.

func (Color) IsMutable

func (c Color) IsMutable() bool

func (*Color) PrettyPrint

func (c *Color) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Color) Prop

func (c *Color) Prop(name string) Value

func (*Color) PropertyNames

func (*Color) PropertyNames() []string

func (*Color) Test

func (c *Color) Test(v Value, state RecTestCallState) bool

func (*Color) WidestOfType

func (c *Color) WidestOfType() Value

type Comparable

type Comparable interface {
	Value
	// contains filtered or unexported methods
}

type ComparableMixin

type ComparableMixin struct {
}

type CompileTimeType

type CompileTimeType interface {
	Equal(v CompileTimeType, state RecTestCallState) bool
	TestValue(v Value, state RecTestCallState) bool
	SymbolicValue() Value
	PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)
}

type ComplexPropertyConstraint

type ComplexPropertyConstraint struct {
	NotCallablePatternMixin
	Properties []string
	Expr       parse.Node
}

type ConcreteContext

type ConcreteContext interface {
	context.Context
	HasPermissionUntyped(perm any) bool
	HasAPermissionWithKindAndType(kind permkind.PermissionKind, typename permkind.InternalPermissionTypename) bool
}

type ConcreteGlobalValue

type ConcreteGlobalValue struct {
	Value      any
	IsConstant bool
}

func (ConcreteGlobalValue) Constness

func (v ConcreteGlobalValue) Constness() GlobalConstness

type ConcreteValueFactories

type ConcreteValueFactories struct {
	CreateNil  func() any
	CreateBool func(bool) any

	CreateFloat func(float64) any
	CreateInt   func(int64) any

	CreateByteCount func(int64) any
	CreateLineCount func(int64) any
	CreateRuneCount func(int64) any
	CreateFrequency func(float64) any
	CreateByteRate  func(int64) any

	CreateDuration func(time.Duration) any
	CreateYear     func(time.Time) any
	CreateDate     func(time.Time) any
	CreateDateTime func(time.Time) any

	CreateByte                func(byte) any
	CreateRune                func(rune) any
	CreateString              func(string) any
	CreateStringConcatenation func(elements []any) any

	CreatePath   func(string) any
	CreateURL    func(string) any
	CreateHost   func(string) any
	CreateScheme func(string) any

	CreateIdentifier    func(string) any
	CreatePropertyName  func(string) any
	CreateLongValuePath func(segments ...any) any

	CreateByteSlice func([]byte) any
	CreateRuneSlice func([]rune) any

	CreateObject      func(concreteProperties map[string]any) any
	CreateRecord      func(concreteProperties map[string]any) any
	CreateList        func(elements []any) any
	CreateTuple       func(elements []any) any
	CreateOrderedPair func(first, second any) any
	CreateKeyList     func(names []string) any
	CreateDictionary  func(keys, values []any, ctx ConcreteContext) any

	CreatePathPattern func(string) any
	CreateURLPattern  func(string) any
	CreateHostPattern func(string) any

	CreateObjectPattern func(inexact bool, concretePropertyPatterns map[string]any, optionalProperties map[string]struct{}) any
	CreateRecordPattern func(inexact bool, concretePropertyPatterns map[string]any, optionalProperties map[string]struct{}) any
	CreateListPattern   func(generalElementPattern any, elementPatterns []any) any
	CreateTuplePattern  func(generalElementPattern any, elementPatterns []any) any

	CreateExactValuePattern  func(value any) any
	CreateExactStringPattern func(value any) any

	CreateOption func(name string, value any) any

	CreateULID func(ulid.ULID) any
	CreateUUID func(uuid.UUID) any
}

type Container

type Container interface {
	Serializable
	Iterable
	Contains(value Serializable) (yes bool, possible bool)
}

type Context

type Context struct {
	// contains filtered or unexported fields
}

func NewSymbolicContext

func NewSymbolicContext(startingConcreteContext, concreteContext ConcreteContext, parentContext *Context) *Context

func (*Context) AddFormattedSymbolicGoFunctionError

func (ctx *Context) AddFormattedSymbolicGoFunctionError(format string, args ...any)

func (*Context) AddHostAlias

func (ctx *Context) AddHostAlias(name string, val *Host, ignoreError bool)

func (*Context) AddNamedPattern

func (ctx *Context) AddNamedPattern(name string, pattern Pattern, ignoreError bool, optDefinitionPosition ...parse.SourcePositionRange)

func (*Context) AddPatternNamespace

func (ctx *Context) AddPatternNamespace(name string, namespace *PatternNamespace, ignoreError bool, optDefinitionPosition ...parse.SourcePositionRange)

func (*Context) AddSymbolicGoFunctionError

func (ctx *Context) AddSymbolicGoFunctionError(msg string)

func (*Context) AddSymbolicGoFunctionErrorf

func (ctx *Context) AddSymbolicGoFunctionErrorf(fmtS string, args ...any)

func (*Context) AddSymbolicGoFunctionWarning

func (ctx *Context) AddSymbolicGoFunctionWarning(msg string)

func (*Context) AddTypeExtension

func (ctx *Context) AddTypeExtension(extension *TypeExtension)

func (*Context) AllNamedPatternNames

func (ctx *Context) AllNamedPatternNames() []string

func (*Context) CopyHostAliasesIn

func (ctx *Context) CopyHostAliasesIn(destCtx *Context)

func (*Context) CopyNamedPatternsIn

func (ctx *Context) CopyNamedPatternsIn(destCtx *Context)

func (*Context) CopyPatternNamespacesIn

func (ctx *Context) CopyPatternNamespacesIn(destCtx *Context)

func (*Context) CopyTypeExtensions

func (ctx *Context) CopyTypeExtensions(destCtx *Context)

func (*Context) EvalState

func (ctx *Context) EvalState() *State

func (*Context) ForEachPattern

func (ctx *Context) ForEachPattern(fn func(name string, pattern Pattern, knowPosition bool, position parse.SourcePositionRange))

func (*Context) ForEachPatternNamespace

func (ctx *Context) ForEachPatternNamespace(fn func(name string, namespace *PatternNamespace, knowPosition bool, position parse.SourcePositionRange))

func (*Context) GetExtensions

func (ctx *Context) GetExtensions(v Value) (extensions []*TypeExtension)

func (*Context) HasAPermissionWithKindAndType

func (ctx *Context) HasAPermissionWithKindAndType(kind permkind.PermissionKind, name permkind.InternalPermissionTypename) bool

func (*Context) HasPermission

func (ctx *Context) HasPermission(perm any) bool

func (*Context) ResolveHostAlias

func (ctx *Context) ResolveHostAlias(alias string) Value

func (*Context) ResolveNamedPattern

func (ctx *Context) ResolveNamedPattern(name string) Pattern

func (*Context) ResolvePatternNamespace

func (ctx *Context) ResolvePatternNamespace(name string) *PatternNamespace

func (*Context) SetSymbolicGoFunctionParameters

func (ctx *Context) SetSymbolicGoFunctionParameters(parameters *[]Value, names []string)

func (*Context) SetSymbolicVariadicGoFunctionParameters

func (ctx *Context) SetSymbolicVariadicGoFunctionParameters(parameters *[]Value, names []string)

func (*Context) SetUpdatedSelf

func (ctx *Context) SetUpdatedSelf(v Value)

type ContextData

type ContextData struct {
	Patterns          []NamedPatternData     //the slice is potentially shared between several ContextData
	PatternNamespaces []PatternNamespaceData //the slice is potentially shared between several ContextData
	Extensions        []*TypeExtension
}

type CurrentTest

type CurrentTest struct {
	UnassignablePropsMixin
	// contains filtered or unexported fields
}

A CurrentTest represents a symbolic CurrentTest.

func (*CurrentTest) GetGoMethod

func (t *CurrentTest) GetGoMethod(name string) (*GoFunction, bool)

func (*CurrentTest) IsMutable

func (*CurrentTest) IsMutable() bool

func (*CurrentTest) PrettyPrint

func (t *CurrentTest) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*CurrentTest) Prop

func (t *CurrentTest) Prop(name string) Value

func (*CurrentTest) PropertyNames

func (*CurrentTest) PropertyNames() []string

func (*CurrentTest) Test

func (t *CurrentTest) Test(v Value, state RecTestCallState) bool

func (*CurrentTest) WidestOfType

func (t *CurrentTest) WidestOfType() Value

type Data

type Data struct {
	// contains filtered or unexported fields
}

Data represents the data produced by the symbolic execution of an AST.

func EvalCheck

func EvalCheck(input EvalCheckInput) (*Data, error)

EvalCheck performs various checks on an AST, most checks are type checks. If the returned data is not nil the error is nil or is the combination of checking errors, the list of checking errors is stored in the symbolic data. If the returned data is nil the error is an unexpected one (it is not about bad code). StaticCheck() should be runned before this function.

func NewSymbolicData

func NewSymbolicData() *Data

func (*Data) AddData

func (data *Data) AddData(newData *Data)

func (*Data) AddError

func (data *Data) AddError(err SymbolicEvaluationError)

func (*Data) AddWarning

func (data *Data) AddWarning(warning SymbolicEvaluationWarning)

func (*Data) Compute

func (d *Data) Compute(ctx *Context, key Value) Value

func (*Data) Errors

func (data *Data) Errors() []SymbolicEvaluationError

func (*Data) GetAllTypeExtensions

func (d *Data) GetAllTypeExtensions(n *parse.DoubleColonExpression) ([]*TypeExtension, bool)

func (*Data) GetAllowedNonPresentKeys

func (data *Data) GetAllowedNonPresentKeys(node parse.Node) ([]string, bool)

func (*Data) GetAllowedNonPresentProperties

func (data *Data) GetAllowedNonPresentProperties(node parse.Node) ([]string, bool)

func (*Data) GetComptimeTypes

func (d *Data) GetComptimeTypes(module parse.Node) (*ModuleCompileTimeTypes, bool)

func (*Data) GetContextData

func (d *Data) GetContextData(n parse.Node, ancestorChain []parse.Node) (ContextData, bool)

func (*Data) GetCreateComptimeTypes

func (d *Data) GetCreateComptimeTypes(module parse.Node) *ModuleCompileTimeTypes

func (*Data) GetGlobalScopeData

func (d *Data) GetGlobalScopeData(n parse.Node, ancestorChain []parse.Node) (ScopeData, bool)

func (*Data) GetGoMethod

func (d *Data) GetGoMethod(name string) (*GoFunction, bool)

func (*Data) GetLessSpecificNodeValue

func (data *Data) GetLessSpecificNodeValue(node parse.Node) (Value, bool)

func (*Data) GetLocalScopeData

func (d *Data) GetLocalScopeData(n parse.Node, ancestorChain []parse.Node) (ScopeData, bool)

func (*Data) GetMostSpecificNodeValue

func (data *Data) GetMostSpecificNodeValue(node parse.Node) (Value, bool)

func (*Data) GetNamedPatternOrPatternNamespacePositionDefinition

func (d *Data) GetNamedPatternOrPatternNamespacePositionDefinition(node parse.Node, ancestors []parse.Node) (pos parse.SourcePositionRange, found bool)

func (*Data) GetRuntimeTypecheckPattern

func (data *Data) GetRuntimeTypecheckPattern(node parse.Node) (any, bool)

func (*Data) GetURLReferencedEntity

func (d *Data) GetURLReferencedEntity(n *parse.DoubleColonExpression) (Value, bool)

func (*Data) GetUsedTypeExtension

func (d *Data) GetUsedTypeExtension(n *parse.DoubleColonExpression) (*TypeExtension, bool)

func (*Data) GetVariableDefinitionPosition

func (d *Data) GetVariableDefinitionPosition(node parse.Node, ancestors []parse.Node) (pos parse.SourcePositionRange, found bool)

func (*Data) IsEmpty

func (data *Data) IsEmpty() bool

func (*Data) IsMutable

func (d *Data) IsMutable() bool

func (*Data) PrettyPrint

func (d *Data) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Data) Prop

func (d *Data) Prop(name string) Value

func (*Data) PropertyNames

func (*Data) PropertyNames() []string

func (*Data) PushNodeValue

func (data *Data) PushNodeValue(node parse.Node, v Value)

func (*Data) SetAllTypeExtensions

func (d *Data) SetAllTypeExtensions(n *parse.DoubleColonExpression, extensions []*TypeExtension)

func (*Data) SetAllowedNonPresentKeys

func (data *Data) SetAllowedNonPresentKeys(node parse.Node, keys []string)

func (*Data) SetAllowedNonPresentProperties

func (data *Data) SetAllowedNonPresentProperties(node parse.Node, properties []string)

func (*Data) SetContextData

func (d *Data) SetContextData(n parse.Node, contextData ContextData)

func (*Data) SetGlobalScopeData

func (d *Data) SetGlobalScopeData(n parse.Node, scopeData ScopeData)

TODO: global scope data generally contain a lot of variables, find a way to reduce memory usage.

func (*Data) SetLessSpecificNodeValue

func (data *Data) SetLessSpecificNodeValue(node parse.Node, v Value)

func (*Data) SetLocalScopeData

func (d *Data) SetLocalScopeData(n parse.Node, scopeData ScopeData)

func (*Data) SetMostSpecificNodeValue

func (data *Data) SetMostSpecificNodeValue(node parse.Node, v Value)

func (*Data) SetProp

func (d *Data) SetProp(name string, value Value) (IProps, error)

func (*Data) SetRuntimeTypecheckPattern

func (data *Data) SetRuntimeTypecheckPattern(node parse.Node, pattern any)

func (*Data) SetURLReferencedEntity

func (d *Data) SetURLReferencedEntity(n *parse.DoubleColonExpression, value Value)

func (*Data) SetUsedTypeExtension

func (d *Data) SetUsedTypeExtension(n *parse.DoubleColonExpression, ext *TypeExtension)

func (*Data) Test

func (d *Data) Test(v Value, state RecTestCallState) bool

func (*Data) Warnings

func (data *Data) Warnings() []SymbolicEvaluationWarning

func (*Data) WidestOfType

func (m *Data) WidestOfType() Value

func (*Data) WithExistingPropReplaced

func (d *Data) WithExistingPropReplaced(name string, value Value) (IProps, error)

type DataChunk

type DataChunk struct {
	UnassignablePropsMixin
	// contains filtered or unexported fields
}

A DataChunk represents a symbolic DataChunk.

func NewChunk

func NewChunk(data Value) *DataChunk

func (*DataChunk) GetGoMethod

func (r *DataChunk) GetGoMethod(name string) (*GoFunction, bool)

func (*DataChunk) IsMutable

func (c *DataChunk) IsMutable() bool

func (*DataChunk) PrettyPrint

func (r *DataChunk) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*DataChunk) Prop

func (r *DataChunk) Prop(name string) Value

func (*DataChunk) PropertyNames

func (*DataChunk) PropertyNames() []string

func (*DataChunk) Test

func (c *DataChunk) Test(v Value, state RecTestCallState) bool

func (*DataChunk) WidestOfType

func (r *DataChunk) WidestOfType() Value

type DatabaseIL

type DatabaseIL struct {
	UnassignablePropsMixin
	// contains filtered or unexported fields
}

A DatabaseIL represents a symbolic DatabaseIL.

func NewDatabaseIL

func NewDatabaseIL(args DatabaseILParams) *DatabaseIL

func (*DatabaseIL) Close

func (db *DatabaseIL) Close(*Context) *Error

func (*DatabaseIL) GetGoMethod

func (db *DatabaseIL) GetGoMethod(name string) (*GoFunction, bool)

func (*DatabaseIL) GetPseudoPathCompletions

func (db *DatabaseIL) GetPseudoPathCompletions(pseudoPath string, isPattern bool) (completions []string)

func (*DatabaseIL) IsMutable

func (*DatabaseIL) IsMutable() bool

func (*DatabaseIL) PrettyPrint

func (db *DatabaseIL) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*DatabaseIL) Prop

func (db *DatabaseIL) Prop(name string) Value

func (*DatabaseIL) PropertyNames

func (db *DatabaseIL) PropertyNames() []string

func (*DatabaseIL) Test

func (db *DatabaseIL) Test(v Value, state RecTestCallState) bool

func (*DatabaseIL) UpdateSchema

func (db *DatabaseIL) UpdateSchema(ctx *Context, schema *ObjectPattern, additionalArgs ...*Object)

func (*DatabaseIL) WidestOfType

func (*DatabaseIL) WidestOfType() Value

type DatabaseILParams

type DatabaseILParams struct {
	Schema               *ObjectPattern
	SchemaUpdateExpected bool
	BaseURL              *URL //optional, should not be set if Host is set
}

type Date

type Date struct {
	SerializableMixin
	ComparableMixin
	// contains filtered or unexported fields
}

A Date represents a symbolic Date.

func NewDate

func NewDate(v time.Time) *Date

func (*Date) Concretize

func (d *Date) Concretize(ctx ConcreteContext) any

func (*Date) IsConcretizable

func (d *Date) IsConcretizable() bool

func (Date) IsMutable

func (d Date) IsMutable() bool

func (*Date) PrettyPrint

func (d *Date) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Date) Static

func (d *Date) Static() Pattern

func (*Date) Test

func (d *Date) Test(v Value, state RecTestCallState) bool

func (*Date) WidestOfType

func (d *Date) WidestOfType() Value

type DateTime

type DateTime struct {
	SerializableMixin
	ComparableMixin
	// contains filtered or unexported fields
}

A DateTime represents a symbolic DateTime.

func NewDateTime

func NewDateTime(v time.Time) *DateTime

func (*DateTime) Add

func (d *DateTime) Add(other Value, node *parse.BinaryExpression, state *State) (Value, error)

func (*DateTime) Concretize

func (d *DateTime) Concretize(ctx ConcreteContext) any

func (*DateTime) IsConcretizable

func (d *DateTime) IsConcretizable() bool

func (DateTime) IsMutable

func (d DateTime) IsMutable() bool

func (*DateTime) PrettyPrint

func (d *DateTime) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*DateTime) Static

func (d *DateTime) Static() Pattern

func (*DateTime) Sub

func (d *DateTime) Sub(other Value, node *parse.BinaryExpression, state *State) (Value, error)

func (*DateTime) Test

func (d *DateTime) Test(v Value, state RecTestCallState) bool

func (*DateTime) WidestOfType

func (d *DateTime) WidestOfType() Value

type Dictionary

type Dictionary struct {
	SerializableMixin
	ClonableSerializableMixin

	UnassignablePropsMixin
	// contains filtered or unexported fields
}

func NewAnyDictionary

func NewAnyDictionary() *Dictionary

func NewDictionary

func NewDictionary(entries map[string]Serializable, keys map[string]Serializable) *Dictionary

func NewUnitializedDictionary

func NewUnitializedDictionary() *Dictionary

func (*Dictionary) Concretize

func (dict *Dictionary) Concretize(ctx ConcreteContext) any

func (*Dictionary) Entries

func (dict *Dictionary) Entries() map[string]Serializable

func (*Dictionary) ForEachEntry

func (dict *Dictionary) ForEachEntry(fn func(k string, v Value) error) error

func (*Dictionary) Get

func (dict *Dictionary) Get(ctx *Context, key Serializable) (Value, *Bool)

func (*Dictionary) IsConcretizable

func (dict *Dictionary) IsConcretizable() bool

func (*Dictionary) IsMutable

func (dict *Dictionary) IsMutable() bool

func (*Dictionary) IteratorElementKey

func (dict *Dictionary) IteratorElementKey() Value

func (*Dictionary) IteratorElementValue

func (dict *Dictionary) IteratorElementValue() Value

func (*Dictionary) Keys

func (dict *Dictionary) Keys() map[string]Serializable

func (*Dictionary) PrettyPrint

func (dict *Dictionary) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Dictionary) Prop

func (dict *Dictionary) Prop(name string) Value

func (*Dictionary) PropertyNames

func (dict *Dictionary) PropertyNames() []string

func (*Dictionary) SetValue

func (dict *Dictionary) SetValue(ctx *Context, key, value Serializable)

func (*Dictionary) Test

func (dict *Dictionary) Test(v Value, state RecTestCallState) bool

func (*Dictionary) WatcherElement

func (dict *Dictionary) WatcherElement() Value

func (*Dictionary) WidestOfType

func (d *Dictionary) WidestOfType() Value

type DifferencePattern

type DifferencePattern struct {
	Base    Pattern
	Removed Pattern
	NotCallablePatternMixin
	SerializableMixin
}

func (*DifferencePattern) HasUnderlyingPattern

func (p *DifferencePattern) HasUnderlyingPattern() bool

func (*DifferencePattern) IsMutable

func (pattern *DifferencePattern) IsMutable() bool

func (*DifferencePattern) IteratorElementKey

func (p *DifferencePattern) IteratorElementKey() Value

func (*DifferencePattern) IteratorElementValue

func (p *DifferencePattern) IteratorElementValue() Value

func (*DifferencePattern) PrettyPrint

func (*DifferencePattern) StringPattern

func (p *DifferencePattern) StringPattern() (StringPattern, bool)

func (*DifferencePattern) SymbolicValue

func (p *DifferencePattern) SymbolicValue() Value

func (*DifferencePattern) Test

func (p *DifferencePattern) Test(v Value, state RecTestCallState) bool

func (*DifferencePattern) TestValue

func (p *DifferencePattern) TestValue(v Value, state RecTestCallState) bool

func (*DifferencePattern) WidestOfType

func (p *DifferencePattern) WidestOfType() Value

type DirPathConstraint

type DirPathConstraint int
const (
	UnspecifiedDirOrFilePath DirPathConstraint = iota
	DirPath
	NonDirPath
)

type Duration

type Duration struct {
	SerializableMixin

	ComparableMixin
	// contains filtered or unexported fields
}

A Duration represents a symbolic Duration.

func NewDuration

func NewDuration(v time.Duration) *Duration

func (*Duration) Add

func (d *Duration) Add(right Value, node *parse.BinaryExpression, state *State) (Value, error)

func (*Duration) Concretize

func (d *Duration) Concretize(ctx ConcreteContext) any

func (*Duration) IsConcretizable

func (d *Duration) IsConcretizable() bool

func (Duration) IsMutable

func (d Duration) IsMutable() bool

func (*Duration) PrettyPrint

func (d *Duration) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Duration) Static

func (d *Duration) Static() Pattern

func (*Duration) Sub

func (d *Duration) Sub(right Value, node *parse.BinaryExpression, state *State) (Value, error)

func (*Duration) Test

func (d *Duration) Test(v Value, state RecTestCallState) bool

func (*Duration) WidestOfType

func (d *Duration) WidestOfType() Value

type DynamicValue

type DynamicValue struct {
	// contains filtered or unexported fields
}

An DynamicValue represents a symbolic DynamicValue.

func NewAnyDynamicValue

func NewAnyDynamicValue() *DynamicValue

func NewDynamicValue

func NewDynamicValue(val Value) *DynamicValue

func (*DynamicValue) IsMutable

func (c *DynamicValue) IsMutable() bool

func (*DynamicValue) IteratorElementKey

func (d *DynamicValue) IteratorElementKey() Value

func (*DynamicValue) IteratorElementValue

func (d *DynamicValue) IteratorElementValue() Value

func (*DynamicValue) PrettyPrint

func (d *DynamicValue) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*DynamicValue) Prop

func (d *DynamicValue) Prop(memberName string) Value

func (*DynamicValue) PropertyNames

func (d *DynamicValue) PropertyNames() []string

func (*DynamicValue) SetProp

func (d *DynamicValue) SetProp(name string, value Value) (IProps, error)

func (*DynamicValue) TakeInMemorySnapshot

func (d *DynamicValue) TakeInMemorySnapshot() (*Snapshot, error)

func (*DynamicValue) Test

func (d *DynamicValue) Test(v Value, state RecTestCallState) bool

func (*DynamicValue) WatcherElement

func (d *DynamicValue) WatcherElement() Value

func (*DynamicValue) WidestOfType

func (d *DynamicValue) WidestOfType() Value

func (*DynamicValue) WithExistingPropReplaced

func (d *DynamicValue) WithExistingPropReplaced(name string, value Value) (IProps, error)

type EmailAddress

type EmailAddress struct {
	SerializableMixin
	// contains filtered or unexported fields
}

A EmailAddress represents a symbolic EmailAddress.

func NewEmailAddress

func NewEmailAddress(v string) *EmailAddress

func (EmailAddress) IsMutable

func (addr EmailAddress) IsMutable() bool

func (*EmailAddress) PrettyPrint

func (e *EmailAddress) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*EmailAddress) Prop

func (*EmailAddress) Prop(name string) Value

func (*EmailAddress) PropertyNames

func (e *EmailAddress) PropertyNames() []string

func (*EmailAddress) Static

func (e *EmailAddress) Static() Pattern

func (*EmailAddress) Test

func (e *EmailAddress) Test(v Value, state RecTestCallState) bool

func (*EmailAddress) WidestOfType

func (e *EmailAddress) WidestOfType() Value

type Error

type Error struct {
	UnassignablePropsMixin
	SerializableMixin
	// contains filtered or unexported fields
}

func NewError

func NewError(data Value) *Error

func (Error) IsMutable

func (err Error) IsMutable() bool

func (*Error) PrettyPrint

func (e *Error) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Error) Prop

func (e *Error) Prop(name string) Value

func (*Error) PropertyNames

func (*Error) PropertyNames() []string

func (*Error) Test

func (e *Error) Test(v Value, state RecTestCallState) bool

func (*Error) WidestOfType

func (e *Error) WidestOfType() Value

type EvalCheckInput

type EvalCheckInput struct {
	Node   *parse.Chunk
	Module *Module

	//should not be set if UseBaseGlobals is true
	Globals                        map[string]ConcreteGlobalValue
	AdditionalSymbolicGlobalConsts map[string]Value

	UseBaseGlobals                bool
	SymbolicBaseGlobals           map[string]Value
	SymbolicBasePatterns          map[string]Pattern
	SymbolicBasePatternNamespaces map[string]*PatternNamespace

	IsShellChunk         bool
	ShellLocalVars       map[string]any
	ShellTrustedCommands []string
	Context              *Context

	//nil if no project
	ProjectFilesystem billy.Filesystem
	// contains filtered or unexported fields
}

type Event

type Event struct {
	UnassignablePropsMixin
	// contains filtered or unexported fields
}

func NewEvent

func NewEvent(value Value) (*Event, error)

func (*Event) IsMutable

func (e *Event) IsMutable() bool

func (*Event) PrettyPrint

func (r *Event) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Event) Prop

func (e *Event) Prop(name string) Value

func (*Event) PropertyNames

func (e *Event) PropertyNames() []string

func (*Event) Test

func (r *Event) Test(v Value, state RecTestCallState) bool

func (*Event) WidestOfType

func (r *Event) WidestOfType() Value

type EventPattern

type EventPattern struct {
	ValuePattern Pattern

	NotCallablePatternMixin
	SerializableMixin
}

An EventPattern represents a symbolic EventPattern.

func NewEventPattern

func NewEventPattern(valuePattern Pattern) (*EventPattern, error)

func (*EventPattern) HasUnderlyingPattern

func (p *EventPattern) HasUnderlyingPattern() bool

func (*EventPattern) IsMutable

func (patt *EventPattern) IsMutable() bool

func (*EventPattern) IteratorElementKey

func (p *EventPattern) IteratorElementKey() Value

func (*EventPattern) IteratorElementValue

func (p *EventPattern) IteratorElementValue() Value

func (*EventPattern) PrettyPrint

func (p *EventPattern) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*EventPattern) StringPattern

func (p *EventPattern) StringPattern() (StringPattern, bool)

func (*EventPattern) SymbolicValue

func (p *EventPattern) SymbolicValue() Value

func (*EventPattern) Test

func (p *EventPattern) Test(v Value, state RecTestCallState) bool

func (*EventPattern) TestValue

func (p *EventPattern) TestValue(v Value, state RecTestCallState) bool

func (*EventPattern) WidestOfType

func (p *EventPattern) WidestOfType() Value

type EventSource

type EventSource struct {
	UnassignablePropsMixin
	// contains filtered or unexported fields
}

EventSource represents a symbolic EventSource.

func NewEventSource

func NewEventSource() *EventSource

func (*EventSource) Close

func (s *EventSource) Close()

func (*EventSource) GetGoMethod

func (s *EventSource) GetGoMethod(name string) (*GoFunction, bool)

func (*EventSource) IsMutable

func (e *EventSource) IsMutable() bool

func (*EventSource) IteratorElementKey

func (s *EventSource) IteratorElementKey() Value

func (*EventSource) IteratorElementValue

func (s *EventSource) IteratorElementValue() Value

func (*EventSource) PrettyPrint

func (s *EventSource) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*EventSource) Prop

func (s *EventSource) Prop(name string) Value

func (*EventSource) PropertyNames

func (*EventSource) PropertyNames() []string

func (*EventSource) SetProp

func (s *EventSource) SetProp(name string, value Value) (IProps, error)

func (*EventSource) Test

func (s *EventSource) Test(v Value, state RecTestCallState) bool

func (*EventSource) WidestOfType

func (s *EventSource) WidestOfType() Value

func (*EventSource) WithExistingPropReplaced

func (s *EventSource) WithExistingPropReplaced(name string, value Value) (IProps, error)

type ExactStringPattern

type ExactStringPattern struct {
	NotCallablePatternMixin
	SerializableMixin
	// contains filtered or unexported fields
}

An ExactStringPattern represents a symbolic ExactStringPattern.

func NewExactStringPatternWithConcreteValue

func NewExactStringPatternWithConcreteValue(value *String) *ExactStringPattern

func NewExactStringPatternWithRunTimeValue

func NewExactStringPatternWithRunTimeValue(rv *strLikeRunTimeValue) *ExactStringPattern

func (*ExactStringPattern) Concretize

func (p *ExactStringPattern) Concretize(ctx ConcreteContext) any

func (*ExactStringPattern) HasRegex

func (p *ExactStringPattern) HasRegex() bool

func (*ExactStringPattern) HasUnderlyingPattern

func (p *ExactStringPattern) HasUnderlyingPattern() bool

func (*ExactStringPattern) IsConcretizable

func (p *ExactStringPattern) IsConcretizable() bool

func (*ExactStringPattern) IsMutable

func (pattern *ExactStringPattern) IsMutable() bool

func (*ExactStringPattern) IteratorElementKey

func (p *ExactStringPattern) IteratorElementKey() Value

func (*ExactStringPattern) IteratorElementValue

func (p *ExactStringPattern) IteratorElementValue() Value

func (*ExactStringPattern) MigrationInitialValue

func (p *ExactStringPattern) MigrationInitialValue() (Serializable, bool)

func (*ExactStringPattern) PrettyPrint

func (*ExactStringPattern) StringPattern

func (p *ExactStringPattern) StringPattern() (StringPattern, bool)

func (*ExactStringPattern) SymbolicValue

func (p *ExactStringPattern) SymbolicValue() Value

func (*ExactStringPattern) Test

func (p *ExactStringPattern) Test(v Value, state RecTestCallState) bool

func (*ExactStringPattern) TestValue

func (p *ExactStringPattern) TestValue(v Value, state RecTestCallState) bool

func (*ExactStringPattern) WidestOfType

func (p *ExactStringPattern) WidestOfType() Value

func (*ExactStringPattern) WithExactValuePatternsRemoved

func (p *ExactStringPattern) WithExactValuePatternsRemoved() (Pattern, error)

type ExactValuePattern

type ExactValuePattern struct {
	NotCallablePatternMixin
	SerializableMixin
	// contains filtered or unexported fields
}

An ExactValuePattern represents a symbolic ExactValuePattern.

func NewExactValuePattern

func NewExactValuePattern(v Serializable) (*ExactValuePattern, error)

func NewUncheckedExactValuePattern

func NewUncheckedExactValuePattern(v Serializable) (*ExactValuePattern, error)

func (*ExactValuePattern) Concretize

func (p *ExactValuePattern) Concretize(ctx ConcreteContext) any

func (*ExactValuePattern) GetVal

func (p *ExactValuePattern) GetVal() Value

result should not be modified

func (*ExactValuePattern) HasUnderlyingPattern

func (p *ExactValuePattern) HasUnderlyingPattern() bool

func (*ExactValuePattern) IsConcretizable

func (p *ExactValuePattern) IsConcretizable() bool

func (*ExactValuePattern) IsMutable

func (pattern *ExactValuePattern) IsMutable() bool

func (*ExactValuePattern) IteratorElementKey

func (p *ExactValuePattern) IteratorElementKey() Value

func (*ExactValuePattern) IteratorElementValue

func (p *ExactValuePattern) IteratorElementValue() Value

func (*ExactValuePattern) MigrationInitialValue

func (p *ExactValuePattern) MigrationInitialValue() (Serializable, bool)

func (*ExactValuePattern) PrettyPrint

func (*ExactValuePattern) SetVal

func (p *ExactValuePattern) SetVal(v Serializable)

func (*ExactValuePattern) StringPattern

func (p *ExactValuePattern) StringPattern() (StringPattern, bool)

func (*ExactValuePattern) SymbolicValue

func (p *ExactValuePattern) SymbolicValue() Value

func (*ExactValuePattern) Test

func (p *ExactValuePattern) Test(v Value, state RecTestCallState) bool

func (*ExactValuePattern) TestValue

func (p *ExactValuePattern) TestValue(v Value, state RecTestCallState) bool

func (*ExactValuePattern) WidestOfType

func (p *ExactValuePattern) WidestOfType() Value

func (*ExactValuePattern) WithExactValuePatternsRemoved

func (p *ExactValuePattern) WithExactValuePatternsRemoved() (Pattern, error)

type ExampleComputationContext

type ExampleComputationContext struct {
	NonMatchingValue Value
}

type ExecutedStep

type ExecutedStep struct {
	UnassignablePropsMixin
	// contains filtered or unexported fields
}

An ExecutedStep represents a symbolic ExecutedStep.

func (*ExecutedStep) Cancel

func (s *ExecutedStep) Cancel(*Context)

func (*ExecutedStep) GetGoMethod

func (s *ExecutedStep) GetGoMethod(name string) (*GoFunction, bool)

func (*ExecutedStep) IsMutable

func (s *ExecutedStep) IsMutable() bool

func (*ExecutedStep) PrettyPrint

func (s *ExecutedStep) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*ExecutedStep) Prop

func (s *ExecutedStep) Prop(name string) Value

func (*ExecutedStep) PropertyNames

func (*ExecutedStep) PropertyNames() []string

func (*ExecutedStep) Test

func (s *ExecutedStep) Test(v Value, state RecTestCallState) bool

func (*ExecutedStep) WaitResult

func (s *ExecutedStep) WaitResult(ctx *Context) (Value, *Error)

func (*ExecutedStep) WidestOfType

func (s *ExecutedStep) WidestOfType() Value

type ExternalData

type ExternalData struct {
	ToSymbolicValue                         func(concreteContext ConcreteContext, v any, wide bool) (Value, error)
	GetConcretePatternMatchingSymbolicValue func(concreteCtx ConcreteContext, v Value) (any, bool)
	GetQuantity                             func(values []float64, units []string) (any, error)
	GetRate                                 func(values []float64, units []string, divUnit string) (any, error)
	ConvertKeyReprToValue                   func(string) any
	IsReadable                              func(v any) bool
	IsWritable                              func(v any) bool
	IsIndexKey                              func(k string) bool
	PathMatch                               func(path, pattern string) bool
	URLMatch                                func(url, pattern string) bool
	HostMatch                               func(host, pattern string) bool
	AppendPathSegmentToURL                  func(url, segment string) string
	AppendPathSegmentToURLPattern           func(urlPattern, segment string) string
	CheckDatabaseSchema                     func(objectPattern any) error
	GetTopLevelEntitiesMigrationOperations  func(concreteCtx context.Context, current, next any) ([]MigrationOp, error)
	EstimatePermissionsFromListingNode      func(n *parse.ObjectLiteral) (any, error)
	CreateConcreteContext                   func(permissions any) ConcreteContext

	ConcreteValueFactories ConcreteValueFactories

	DEFAULT_PATTERN_NAMESPACES map[string]*PatternNamespace

	CONSTRAINTS_KEY                         string
	VISIBILITY_KEY                          string
	MANIFEST_PARAMS_SECTION_NAME            string
	MANIFEST_POSITIONAL_PARAM_NAME_FIELD    string
	MANIFEST_POSITIONAL_PARAM_PATTERN_FIELD string
	MOD_ARGS_VARNAME                        string
}

type FileInfo

type FileInfo struct {
	UnassignablePropsMixin
	SerializableMixin
}

A FileInfo represents a symbolic FileInfo.

func (*FileInfo) Concretize

func (f *FileInfo) Concretize(ctx ConcreteContext) any

func (FileInfo) GetGoMethod

func (f FileInfo) GetGoMethod(name string) (*GoFunction, bool)

func (*FileInfo) IsConcretizable

func (f *FileInfo) IsConcretizable() bool

func (FileInfo) IsMutable

func (i FileInfo) IsMutable() bool

func (*FileInfo) PrettyPrint

func (f *FileInfo) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*FileInfo) Prop

func (f *FileInfo) Prop(name string) Value

func (*FileInfo) PropertyNames

func (*FileInfo) PropertyNames() []string

func (*FileInfo) Static

func (f *FileInfo) Static() Pattern

func (*FileInfo) Test

func (f *FileInfo) Test(v Value, state RecTestCallState) bool

func (*FileInfo) WidestOfType

func (f *FileInfo) WidestOfType() Value

type FileMode

type FileMode struct {
	SerializableMixin
	// contains filtered or unexported fields
}

A FileMode represents a symbolic FileMode.

func (FileMode) IsMutable

func (m FileMode) IsMutable() bool

func (*FileMode) PrettyPrint

func (m *FileMode) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*FileMode) Static

func (m *FileMode) Static() Pattern

func (*FileMode) Test

func (m *FileMode) Test(v Value, state RecTestCallState) bool

func (*FileMode) WidestOfType

func (m *FileMode) WidestOfType() Value

type FilesystemSnapshotIL

type FilesystemSnapshotIL struct {
	SerializableMixin
}

A FilesystemSnapshotIL represents a symbolic FilesystemSnapshotIL we don't the concrete type.

func (*FilesystemSnapshotIL) IsMutable

func (*FilesystemSnapshotIL) IsMutable() bool

func (*FilesystemSnapshotIL) PrettyPrint

func (*FilesystemSnapshotIL) Test

func (t *FilesystemSnapshotIL) Test(v Value, state RecTestCallState) bool

func (*FilesystemSnapshotIL) WidestOfType

func (t *FilesystemSnapshotIL) WidestOfType() Value

type Float

type Float struct {
	SerializableMixin
	ComparableMixin
	// contains filtered or unexported fields
}

A Float represents a symbolic Float.

func NewFloat

func NewFloat(v float64) *Float

func (*Float) Concretize

func (f *Float) Concretize(ctx ConcreteContext) any

func (*Float) IsConcretizable

func (f *Float) IsConcretizable() bool

func (Float) IsMutable

func (f Float) IsMutable() bool

func (*Float) PrettyPrint

func (f *Float) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Float) Static

func (f *Float) Static() Pattern

func (*Float) Test

func (f *Float) Test(v Value, state RecTestCallState) bool

func (*Float) WidestOfType

func (f *Float) WidestOfType() Value

type FloatRange

type FloatRange struct {
	SerializableMixin
	// contains filtered or unexported fields
}

An FloatRange represents a symbolic FloatRange.

func NewExcludedEndFloatRange

func NewExcludedEndFloatRange(start, end *Float) *FloatRange

func NewFloatRange

func NewFloatRange(start, end *Float, inclusiveEnd bool) *FloatRange

func NewIncludedEndFloatRange

func NewIncludedEndFloatRange(start, end *Float) *FloatRange

func (*FloatRange) Contains

func (r *FloatRange) Contains(value Serializable) (yes bool, possible bool)

func (*FloatRange) InclusiveEnd

func (r *FloatRange) InclusiveEnd() float64

func (FloatRange) IsMutable

func (r FloatRange) IsMutable() bool

func (*FloatRange) IteratorElementKey

func (r *FloatRange) IteratorElementKey() Value

func (*FloatRange) IteratorElementValue

func (r *FloatRange) IteratorElementValue() Value

func (*FloatRange) PrettyPrint

func (r *FloatRange) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*FloatRange) Static

func (r *FloatRange) Static() Pattern

func (*FloatRange) Test

func (r *FloatRange) Test(v Value, state RecTestCallState) bool

func (*FloatRange) WidestOfType

func (r *FloatRange) WidestOfType() Value

type FloatRangePattern

type FloatRangePattern struct {
	NotCallablePatternMixin
	UnassignablePropsMixin
	SerializableMixin
	// contains filtered or unexported fields
}

A FloatRangePattern represents a symbolic FloatRangePattern.

func NewFloatRangePattern

func NewFloatRangePattern(floatRange *FloatRange) *FloatRangePattern

func (*FloatRangePattern) HasUnderlyingPattern

func (p *FloatRangePattern) HasUnderlyingPattern() bool

func (*FloatRangePattern) IsMutable

func (patt *FloatRangePattern) IsMutable() bool

func (*FloatRangePattern) IteratorElementKey

func (p *FloatRangePattern) IteratorElementKey() Value

func (*FloatRangePattern) IteratorElementValue

func (p *FloatRangePattern) IteratorElementValue() Value

func (*FloatRangePattern) PrettyPrint

func (*FloatRangePattern) Prop

func (*FloatRangePattern) Prop(name string) Value

func (*FloatRangePattern) PropertyNames

func (p *FloatRangePattern) PropertyNames() []string

func (*FloatRangePattern) StringPattern

func (p *FloatRangePattern) StringPattern() (StringPattern, bool)

func (*FloatRangePattern) SymbolicValue

func (p *FloatRangePattern) SymbolicValue() Value

func (*FloatRangePattern) Test

func (p *FloatRangePattern) Test(v Value, state RecTestCallState) bool

func (*FloatRangePattern) TestValue

func (p *FloatRangePattern) TestValue(v Value, state RecTestCallState) bool

func (*FloatRangePattern) WidestOfType

func (p *FloatRangePattern) WidestOfType() Value

type FloatRangeStringPattern

type FloatRangeStringPattern struct {
	NotCallablePatternMixin
	SerializableMixin
	// contains filtered or unexported fields
}

An FloatRangeStringPattern represents a symbolic FloatRangeStringPattern.

func NewFloatRangeStringPattern

func NewFloatRangeStringPattern(p *FloatRangePattern) *FloatRangeStringPattern

func (*FloatRangeStringPattern) HasRegex

func (p *FloatRangeStringPattern) HasRegex() bool

func (*FloatRangeStringPattern) HasUnderlyingPattern

func (p *FloatRangeStringPattern) HasUnderlyingPattern() bool

func (*FloatRangeStringPattern) IsMutable

func (patt *FloatRangeStringPattern) IsMutable() bool

func (*FloatRangeStringPattern) IteratorElementKey

func (p *FloatRangeStringPattern) IteratorElementKey() Value

func (*FloatRangeStringPattern) IteratorElementValue

func (p *FloatRangeStringPattern) IteratorElementValue() Value

func (*FloatRangeStringPattern) PrettyPrint

func (*FloatRangeStringPattern) StringPattern

func (p *FloatRangeStringPattern) StringPattern() (StringPattern, bool)

func (*FloatRangeStringPattern) SymbolicValue

func (p *FloatRangeStringPattern) SymbolicValue() Value

func (*FloatRangeStringPattern) Test

func (*FloatRangeStringPattern) TestValue

func (p *FloatRangeStringPattern) TestValue(v Value, state RecTestCallState) bool

func (*FloatRangeStringPattern) WidestOfType

func (p *FloatRangeStringPattern) WidestOfType() Value

type FloatType

type FloatType struct {
	// contains filtered or unexported fields
}

func (*FloatType) Equal

func (t *FloatType) Equal(v CompileTimeType, state RecTestCallState) bool

func (*FloatType) PrettyPrint

func (t *FloatType) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*FloatType) SymbolicValue

func (t *FloatType) SymbolicValue() Value

func (*FloatType) TestValue

func (t *FloatType) TestValue(v Value, state RecTestCallState) bool

type Format

type Format interface {
	Pattern
	Format(v Value) error
}

type Frequency

type Frequency struct {
	SerializableMixin
	ComparableMixin
	// contains filtered or unexported fields
}

A Frequency represents a symbolic Frequency.

func NewFrequency

func NewFrequency(v float64) *Frequency

func (*Frequency) Concretize

func (r *Frequency) Concretize(ctx ConcreteContext) any

func (*Frequency) IsConcretizable

func (r *Frequency) IsConcretizable() bool

func (Frequency) IsMutable

func (f Frequency) IsMutable() bool

func (*Frequency) PrettyPrint

func (f *Frequency) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Frequency) Static

func (r *Frequency) Static() Pattern

func (*Frequency) Test

func (c *Frequency) Test(v Value, state RecTestCallState) bool

func (*Frequency) WidestOfType

func (r *Frequency) WidestOfType() Value

type Function

type Function struct {
	// contains filtered or unexported fields
}

An Function represents a symbolic function we do not know the concrete type.

func NewFunction

func NewFunction(
	params []Value,
	paramNames []string,

	firstOptionalParamIndex int,
	variadic bool,
	results []Value,
) *Function

func (*Function) HasOptionalParams

func (fn *Function) HasOptionalParams() bool

func (Function) IsMutable

func (any Function) IsMutable() bool

func (*Function) IsVariadic

func (fn *Function) IsVariadic() bool

func (*Function) NonVariadicParameters

func (fn *Function) NonVariadicParameters() []Value

returned slice should not be modified.

func (*Function) OriginGoFunction

func (fn *Function) OriginGoFunction() (*GoFunction, bool)

func (*Function) PrettyPrint

func (f *Function) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Function) Test

func (f *Function) Test(v Value, state RecTestCallState) bool

func (*Function) VariadicParamElem

func (fn *Function) VariadicParamElem() Value

func (*Function) WidestOfType

func (f *Function) WidestOfType() Value

type FunctionPattern

type FunctionPattern struct {
	NotCallablePatternMixin
	SerializableMixin
	// contains filtered or unexported fields
}

func (*FunctionPattern) HasUnderlyingPattern

func (fn *FunctionPattern) HasUnderlyingPattern() bool

func (*FunctionPattern) IsMutable

func (pattern *FunctionPattern) IsMutable() bool

func (*FunctionPattern) IteratorElementKey

func (p *FunctionPattern) IteratorElementKey() Value

func (*FunctionPattern) IteratorElementValue

func (fn *FunctionPattern) IteratorElementValue() Value

func (*FunctionPattern) PrettyPrint

func (fn *FunctionPattern) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*FunctionPattern) StringPattern

func (p *FunctionPattern) StringPattern() (StringPattern, bool)

func (*FunctionPattern) SymbolicValue

func (fn *FunctionPattern) SymbolicValue() Value

func (*FunctionPattern) Test

func (fn *FunctionPattern) Test(v Value, state RecTestCallState) bool

func (*FunctionPattern) TestValue

func (pattern *FunctionPattern) TestValue(v Value, state RecTestCallState) bool

func (*FunctionPattern) WidestOfType

func (fn *FunctionPattern) WidestOfType() Value

type GlobalConstness

type GlobalConstness = int
const (
	GlobalVar GlobalConstness = iota
	GlobalConst
)

type GlobalState

type GlobalState struct {
	UnassignablePropsMixin
	// contains filtered or unexported fields
}

A GlobalState represents a symbolic GlobalState.

func (*GlobalState) Cancel

func (GlobalState *GlobalState) Cancel(*Context)

func (*GlobalState) GetGoMethod

func (r *GlobalState) GetGoMethod(name string) (*GoFunction, bool)

func (*GlobalState) IsMutable

func (s *GlobalState) IsMutable() bool

func (*GlobalState) PrettyPrint

func (r *GlobalState) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*GlobalState) Prop

func (r *GlobalState) Prop(name string) Value

func (*GlobalState) PropertyNames

func (*GlobalState) PropertyNames() []string

func (*GlobalState) Test

func (r *GlobalState) Test(v Value, state RecTestCallState) bool

func (*GlobalState) WaitResult

func (GlobalState *GlobalState) WaitResult(ctx *Context) (Value, *Error)

func (*GlobalState) WidestOfType

func (r *GlobalState) WidestOfType() Value

type GoFunction

type GoFunction struct {
	// contains filtered or unexported fields
}

A GoFunction represents a symbolic GoFunction.

func WrapGoClosure

func WrapGoClosure(goFn any) *GoFunction

func WrapGoFunction

func WrapGoFunction(goFn any) *GoFunction

func WrapGoMethod

func WrapGoMethod(goFn any) *GoFunction

func (*GoFunction) Call

func (goFunc *GoFunction) Call(input goFunctionCallInput) (finalResult Value, multipleResults bool, enoughArgs bool, finalErr error)

func (*GoFunction) GoFunc

func (fn *GoFunction) GoFunc() any

func (*GoFunction) IsMutable

func (goFunc *GoFunction) IsMutable() bool

func (*GoFunction) IsSharable

func (fn *GoFunction) IsSharable() (bool, string)

func (*GoFunction) IsShared

func (fn *GoFunction) IsShared() bool

func (*GoFunction) LoadSignatureData

func (goFunc *GoFunction) LoadSignatureData() (finalErr error)

LoadSignatureData populates the signature fields if they are not already set.

func (*GoFunction) NonVariadicParametersExceptCtx

func (fn *GoFunction) NonVariadicParametersExceptCtx() []Value

the result should not be modified

func (*GoFunction) ParametersExceptCtx

func (fn *GoFunction) ParametersExceptCtx() []Value

the result should not be modified

func (*GoFunction) PrettyPrint

func (fn *GoFunction) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*GoFunction) Result

func (goFunc *GoFunction) Result() Value

func (*GoFunction) Share

func (fn *GoFunction) Share(originState *State) PotentiallySharable

func (*GoFunction) Test

func (fn *GoFunction) Test(v Value, state RecTestCallState) bool

func (*GoFunction) WidestOfType

func (fn *GoFunction) WidestOfType() Value

type GoFunctionKind

type GoFunctionKind int
const (
	GoFunc GoFunctionKind = iota
	GoMethod
	GoClosure
)

type GoValue

type GoValue interface {
	Value
	Prop(name string) Value
	PropertyNames() []string
	GetGoMethod(name string) (*GoFunction, bool)
}

type GroupPattern

type GroupPattern interface {
	Pattern
	MatchGroups(Value) (ok bool, groups map[string]Serializable)
}

A GroupPattern represents a symbolic GroupPattern.

type Host

type Host struct {
	UnassignablePropsMixin
	SerializableMixin
	// contains filtered or unexported fields
}

A Host represents a symbolic Host.

func NewHost

func NewHost(v string) *Host

func NewHostMatchingPattern

func NewHostMatchingPattern(p *HostPattern) *Host

func (*Host) Concretize

func (h *Host) Concretize(ctx ConcreteContext) any

func (*Host) IsConcretizable

func (h *Host) IsConcretizable() bool

func (Host) IsMutable

func (host Host) IsMutable() bool

func (*Host) PrettyPrint

func (h *Host) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Host) Prop

func (*Host) Prop(name string) Value

func (*Host) PropertyNames

func (h *Host) PropertyNames() []string

func (*Host) ResourceName

func (h *Host) ResourceName() *String

func (*Host) Scheme

func (h *Host) Scheme() (*Scheme, bool)

func (*Host) Static

func (h *Host) Static() Pattern

func (*Host) Test

func (h *Host) Test(v Value, state RecTestCallState) bool

func (*Host) WidestOfType

func (h *Host) WidestOfType() Value

type HostPattern

type HostPattern struct {
	NotCallablePatternMixin
	UnassignablePropsMixin
	SerializableMixin
	// contains filtered or unexported fields
}

A HostPattern represents a symbolic HostPattern.

func NewHostPattern

func NewHostPattern(v string) *HostPattern

func NewHostPatternFromNode

func NewHostPatternFromNode(n parse.Node, chunk *parse.Chunk) *HostPattern

func (*HostPattern) HasUnderlyingPattern

func (p *HostPattern) HasUnderlyingPattern() bool

func (*HostPattern) IsConcretizable

func (p *HostPattern) IsConcretizable() bool

func (HostPattern) IsMutable

func (patt HostPattern) IsMutable() bool

func (*HostPattern) IteratorElementKey

func (p *HostPattern) IteratorElementKey() Value

func (*HostPattern) IteratorElementValue

func (p *HostPattern) IteratorElementValue() Value

func (*HostPattern) PrettyPrint

func (p *HostPattern) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*HostPattern) Prop

func (p *HostPattern) Prop(name string) Value

func (*HostPattern) PropertyNames

func (p *HostPattern) PropertyNames() []string

func (*HostPattern) Scheme

func (p *HostPattern) Scheme() (*Scheme, bool)

func (*HostPattern) Static

func (p *HostPattern) Static() Pattern

func (*HostPattern) StringPattern

func (p *HostPattern) StringPattern() (StringPattern, bool)

func (*HostPattern) SymbolicValue

func (p *HostPattern) SymbolicValue() Value

func (*HostPattern) Test

func (p *HostPattern) Test(v Value, state RecTestCallState) bool

func (*HostPattern) TestValue

func (p *HostPattern) TestValue(v Value, state RecTestCallState) bool

func (*HostPattern) WidestOfType

func (p *HostPattern) WidestOfType() Value

type IMultivalue

type IMultivalue interface {
	OriginalMultivalue() *Multivalue
}

type IProps

type IProps interface {
	Value
	Prop(name string) Value

	// SetProp should be equivalent to .SetProp of a concrete IProps, the difference being that the original IProps should
	// not be modified since all symbolic values are immutable, an IProps with the modification should be returned.
	SetProp(name string, value Value) (IProps, error)

	// WithExistingPropReplaced should return a version of the Iprops with the replacement value of the given property.
	WithExistingPropReplaced(name string, value Value) (IProps, error)

	// returned slice should never be modified
	PropertyNames() []string
}

type IPropsPattern

type IPropsPattern interface {
	Value
	//ValuePropPattern should return the pattern of the property (name).
	ValuePropPattern(name string) (propPattern Pattern, isOptional bool, ok bool)

	//ValuePropertyNames should return the list of all property names (optional or not) of values matching the pattern.
	ValuePropertyNames() []string
}

type IPseudoAdd

type IPseudoAdd interface {
	Value
	Add(right Value, node *parse.BinaryExpression, state *State) (Value, error)
}

type IPseudoSub

type IPseudoSub interface {
	Value
	Sub(right Value, node *parse.BinaryExpression, state *State) (Value, error)
}

type IRunTimeValue

type IRunTimeValue interface {
	OriginalRunTimeValue() *RunTimeValue
}

type ISpecificIntersection

type ISpecificIntersection interface {
	SpecificIntersection(other Value, depth int) (Value, error)
}

type IToStatic

type IToStatic interface {
	Static() Pattern
}

type Identifier

type Identifier struct {
	SerializableMixin
	// contains filtered or unexported fields
}

A Identifier represents a symbolic Identifier.

func NewIdentifier

func NewIdentifier(name string) *Identifier

func (*Identifier) Concretize

func (i *Identifier) Concretize(ctx ConcreteContext) any

func (*Identifier) HasConcreteName

func (i *Identifier) HasConcreteName() bool

func (*Identifier) IsConcretizable

func (i *Identifier) IsConcretizable() bool

func (Identifier) IsMutable

func (i Identifier) IsMutable() bool

func (*Identifier) Name

func (i *Identifier) Name() string

func (*Identifier) PrettyPrint

func (i *Identifier) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Identifier) Static

func (i *Identifier) Static() Pattern

func (*Identifier) Test

func (i *Identifier) Test(v Value, state RecTestCallState) bool

func (*Identifier) WidestOfType

func (i *Identifier) WidestOfType() Value

type InMemorySnapshotable

type InMemorySnapshotable interface {
	Watchable
	TakeInMemorySnapshot() (*Snapshot, error)
}

type IncludedChunk

type IncludedChunk struct {
	*parse.ParsedChunkSource
}

type InclusionMigrationOp

type InclusionMigrationOp struct {
	Value    Pattern
	Optional bool
	MigrationMixin
}

type Indexable

type Indexable interface {
	Iterable
	Element() Value
	ElementAt(i int) Value
	KnownLen() int
	HasKnownLen() bool
}

An Indexable represents a symbolic Indexable.

type InexactCapable

type InexactCapable interface {
	Value

	//TestExact should behave like Test() at the only difference that inexactness should be ignored.
	//For example an inexact object should not match an another object that has additional properties.
	TestExact(v Value) bool
}

type InoxFunction

type InoxFunction struct {
	SerializableMixin
	// contains filtered or unexported fields
}

An InoxFunction represents a symbolic InoxFunction. TODO: keep in sync with concrete InoxFunction

func NewInoxFunction

func NewInoxFunction(parameters map[string]Value, capturedLocals map[string]Value, result Value) *InoxFunction

func (*InoxFunction) Concretize

func (fn *InoxFunction) Concretize(ctx ConcreteContext) any

func (*InoxFunction) FuncExpr

func (fn *InoxFunction) FuncExpr() *parse.FunctionExpression

func (*InoxFunction) IsConcretizable

func (fn *InoxFunction) IsConcretizable() bool

func (*InoxFunction) IsMutable

func (fn *InoxFunction) IsMutable() bool

func (*InoxFunction) IsSharable

func (fn *InoxFunction) IsSharable() (bool, string)

func (*InoxFunction) IsShared

func (fn *InoxFunction) IsShared() bool

func (*InoxFunction) IsVariadic

func (fn *InoxFunction) IsVariadic() bool

func (*InoxFunction) ParameterNames

func (fn *InoxFunction) ParameterNames() []string

func (*InoxFunction) Parameters

func (fn *InoxFunction) Parameters() []Value

func (*InoxFunction) PrettyPrint

func (fn *InoxFunction) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*InoxFunction) Result

func (fn *InoxFunction) Result() Value

func (*InoxFunction) Share

func (fn *InoxFunction) Share(originState *State) PotentiallySharable

func (*InoxFunction) Test

func (fn *InoxFunction) Test(v Value, state RecTestCallState) bool

func (*InoxFunction) WatcherElement

func (fn *InoxFunction) WatcherElement() Value

func (*InoxFunction) WidestOfType

func (fn *InoxFunction) WidestOfType() Value

type Int

type Int struct {
	SerializableMixin
	ComparableMixin
	// contains filtered or unexported fields
}

An Int represents a symbolic Int.

func NewInt

func NewInt(v int64) *Int

func (*Int) Concretize

func (i *Int) Concretize(ctx ConcreteContext) any

func (*Int) HasValue

func (i *Int) HasValue() bool

func (*Int) Int64

func (i *Int) Int64() (n *Int, signed bool)

func (*Int) IsConcretizable

func (i *Int) IsConcretizable() bool

func (Int) IsMutable

func (i Int) IsMutable() bool

func (*Int) PrettyPrint

func (i *Int) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Int) Static

func (i *Int) Static() Pattern

func (*Int) Test

func (i *Int) Test(v Value, state RecTestCallState) bool

func (*Int) Value

func (i *Int) Value() int64

func (*Int) WidestOfType

func (i *Int) WidestOfType() Value

func (*Int) WithMatchingPattern

func (i *Int) WithMatchingPattern(pattern *IntRangePattern) *Int

type IntRange

type IntRange struct {
	SerializableMixin
	// contains filtered or unexported fields
}

An IntRange represents a symbolic IntRange.

func NewIntRange

func NewIntRange(start, end *Int, isStepNotOne bool) *IntRange

func (*IntRange) Contains

func (r *IntRange) Contains(value Serializable) (yes bool, possible bool)

func (*IntRange) Element

func (r *IntRange) Element() Value

func (*IntRange) ElementAt

func (*IntRange) ElementAt(i int) Value

func (*IntRange) HasKnownLen

func (r *IntRange) HasKnownLen() bool

func (*IntRange) InclusiveEnd

func (r *IntRange) InclusiveEnd() int64

func (IntRange) IsMutable

func (r IntRange) IsMutable() bool

func (*IntRange) IteratorElementKey

func (r *IntRange) IteratorElementKey() Value

func (*IntRange) IteratorElementValue

func (r *IntRange) IteratorElementValue() Value

func (*IntRange) KnownLen

func (r *IntRange) KnownLen() int

func (*IntRange) PrettyPrint

func (r *IntRange) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*IntRange) Static

func (r *IntRange) Static() Pattern

func (*IntRange) Test

func (r *IntRange) Test(v Value, state RecTestCallState) bool

func (*IntRange) WidestOfType

func (r *IntRange) WidestOfType() Value

type IntRangePattern

type IntRangePattern struct {
	NotCallablePatternMixin
	UnassignablePropsMixin
	SerializableMixin
	// contains filtered or unexported fields
}

A IntRangePattern represents a symbolic IntRangePattern. This symbolic Value does not support the multipleOf constraint, therefore the symbolic version of concrete IntRangePattern(s) with such a constraint should be ANY_INT_RANGE_PATTERN.

func NewIntRangePattern

func NewIntRangePattern(intRange *IntRange) *IntRangePattern

func (*IntRangePattern) HasUnderlyingPattern

func (p *IntRangePattern) HasUnderlyingPattern() bool

func (*IntRangePattern) IsMutable

func (patt *IntRangePattern) IsMutable() bool

func (*IntRangePattern) IteratorElementKey

func (p *IntRangePattern) IteratorElementKey() Value

func (*IntRangePattern) IteratorElementValue

func (p *IntRangePattern) IteratorElementValue() Value

func (*IntRangePattern) PrettyPrint

func (*IntRangePattern) Prop

func (*IntRangePattern) Prop(name string) Value

func (*IntRangePattern) PropertyNames

func (p *IntRangePattern) PropertyNames() []string

func (*IntRangePattern) StringPattern

func (p *IntRangePattern) StringPattern() (StringPattern, bool)

func (*IntRangePattern) SymbolicValue

func (p *IntRangePattern) SymbolicValue() Value

func (*IntRangePattern) Test

func (p *IntRangePattern) Test(v Value, state RecTestCallState) bool

func (*IntRangePattern) TestValue

func (p *IntRangePattern) TestValue(v Value, state RecTestCallState) bool

func (*IntRangePattern) WidestOfType

func (p *IntRangePattern) WidestOfType() Value

type IntRangeStringPattern

type IntRangeStringPattern struct {
	NotCallablePatternMixin
	SerializableMixin
	// contains filtered or unexported fields
}

An IntRangeStringPattern represents a symbolic IntRangeStringPattern.

func NewIntRangeStringPattern

func NewIntRangeStringPattern(p *IntRangePattern) *IntRangeStringPattern

func (*IntRangeStringPattern) HasRegex

func (p *IntRangeStringPattern) HasRegex() bool

func (*IntRangeStringPattern) HasUnderlyingPattern

func (p *IntRangeStringPattern) HasUnderlyingPattern() bool

func (*IntRangeStringPattern) IsMutable

func (patt *IntRangeStringPattern) IsMutable() bool

func (*IntRangeStringPattern) IteratorElementKey

func (p *IntRangeStringPattern) IteratorElementKey() Value

func (*IntRangeStringPattern) IteratorElementValue

func (p *IntRangeStringPattern) IteratorElementValue() Value

func (*IntRangeStringPattern) PrettyPrint

func (*IntRangeStringPattern) StringPattern

func (p *IntRangeStringPattern) StringPattern() (StringPattern, bool)

func (*IntRangeStringPattern) SymbolicValue

func (p *IntRangeStringPattern) SymbolicValue() Value

func (*IntRangeStringPattern) Test

func (*IntRangeStringPattern) TestValue

func (p *IntRangeStringPattern) TestValue(v Value, state RecTestCallState) bool

func (*IntRangeStringPattern) WidestOfType

func (p *IntRangeStringPattern) WidestOfType() Value

type IntType

type IntType struct {
	// contains filtered or unexported fields
}

func (*IntType) Equal

func (t *IntType) Equal(v CompileTimeType, state RecTestCallState) bool

func (*IntType) PrettyPrint

func (t *IntType) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*IntType) SymbolicValue

func (t *IntType) SymbolicValue() Value

func (*IntType) TestValue

func (t *IntType) TestValue(v Value, state RecTestCallState) bool

type Integral

type Integral interface {
	Int64() (i *Int, signed bool)
}

type IntersectionPattern

type IntersectionPattern struct {
	NotCallablePatternMixin

	SerializableMixin
	// contains filtered or unexported fields
}

An IntersectionPattern represents a symbolic IntersectionPattern.

func NewIntersectionPattern

func NewIntersectionPattern(cases []Pattern) (*IntersectionPattern, error)

func (*IntersectionPattern) HasUnderlyingPattern

func (p *IntersectionPattern) HasUnderlyingPattern() bool

func (*IntersectionPattern) IsMutable

func (patt *IntersectionPattern) IsMutable() bool

func (*IntersectionPattern) IteratorElementKey

func (p *IntersectionPattern) IteratorElementKey() Value

func (*IntersectionPattern) IteratorElementValue

func (p *IntersectionPattern) IteratorElementValue() Value

func (*IntersectionPattern) PrettyPrint

func (*IntersectionPattern) StringPattern

func (p *IntersectionPattern) StringPattern() (StringPattern, bool)

func (*IntersectionPattern) SymbolicValue

func (p *IntersectionPattern) SymbolicValue() Value

func (*IntersectionPattern) Test

func (p *IntersectionPattern) Test(v Value, state RecTestCallState) bool

func (*IntersectionPattern) TestValue

func (p *IntersectionPattern) TestValue(v Value, state RecTestCallState) bool

func (*IntersectionPattern) WidestOfType

func (p *IntersectionPattern) WidestOfType() Value

type Iterable

type Iterable interface {
	Value
	IteratorElementKey() Value
	IteratorElementValue() Value
}

An Iterable represents a symbolic Iterable.

type IterationChange

type IterationChange int
const (
	NoIterationChange IterationChange = iota
	BreakIteration
	ContinueIteration
	PruneWalk
)

type Iterator

type Iterator struct {
	ElementValue Value //if nil matches any
	// contains filtered or unexported fields
}

An Iterator represents a symbolic Iterator.

func (*Iterator) IsMutable

func (it *Iterator) IsMutable() bool

func (*Iterator) IteratorElementKey

func (r *Iterator) IteratorElementKey() Value

func (*Iterator) IteratorElementValue

func (r *Iterator) IteratorElementValue() Value

func (*Iterator) PrettyPrint

func (r *Iterator) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Iterator) Test

func (r *Iterator) Test(v Value, state RecTestCallState) bool

func (*Iterator) WidestOfType

func (r *Iterator) WidestOfType() Value

type KeyList

type KeyList struct {
	Keys []string //if nil, matches any
	SerializableMixin
}

A KeyList represents a symbolic KeyList.

func NewAnyKeyList

func NewAnyKeyList() *KeyList

func (*KeyList) Concretize

func (list *KeyList) Concretize(ctx ConcreteContext) any

func (*KeyList) Element

func (list *KeyList) Element() Value

func (*KeyList) ElementAt

func (list *KeyList) ElementAt(i int) Value

func (*KeyList) HasKnownLen

func (list *KeyList) HasKnownLen() bool

func (*KeyList) IsConcretizable

func (list *KeyList) IsConcretizable() bool

func (KeyList) IsMutable

func (list KeyList) IsMutable() bool

func (*KeyList) IteratorElementKey

func (list *KeyList) IteratorElementKey() Value

func (*KeyList) IteratorElementValue

func (list *KeyList) IteratorElementValue() Value

func (*KeyList) KnownLen

func (list *KeyList) KnownLen() int

func (*KeyList) PrettyPrint

func (list *KeyList) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*KeyList) Test

func (list *KeyList) Test(v Value, state RecTestCallState) bool

func (*KeyList) WidestOfType

func (l *KeyList) WidestOfType() Value

type LThread

type LThread struct {
	UnassignablePropsMixin
	// contains filtered or unexported fields
}

A LThread represents a symbolic LThread.

func (*LThread) Cancel

func (t *LThread) Cancel(*Context)

func (*LThread) GetGoMethod

func (t *LThread) GetGoMethod(name string) (*GoFunction, bool)

func (*LThread) IsMutable

func (r *LThread) IsMutable() bool

func (*LThread) PrettyPrint

func (t *LThread) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*LThread) Prop

func (t *LThread) Prop(name string) Value

func (*LThread) PropertyNames

func (*LThread) PropertyNames() []string

func (*LThread) Test

func (t *LThread) Test(v Value, state RecTestCallState) bool

func (*LThread) WaitResult

func (t *LThread) WaitResult(ctx *Context) (Value, *Error)

func (*LThread) WidestOfType

func (t *LThread) WidestOfType() Value

type LThreadGroup

type LThreadGroup struct {
	UnassignablePropsMixin
	// contains filtered or unexported fields
}

A LThreadGroup represents a symbolic LThreadGroup.

func (*LThreadGroup) Add

func (g *LThreadGroup) Add(newRt *LThread)

func (*LThreadGroup) CancelAll

func (g *LThreadGroup) CancelAll(*Context)

func (*LThreadGroup) GetGoMethod

func (g *LThreadGroup) GetGoMethod(name string) (*GoFunction, bool)

func (*LThreadGroup) IsMutable

func (g *LThreadGroup) IsMutable() bool

func (*LThreadGroup) PrettyPrint

func (g *LThreadGroup) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*LThreadGroup) Prop

func (g *LThreadGroup) Prop(name string) Value

func (*LThreadGroup) PropertyNames

func (*LThreadGroup) PropertyNames() []string

func (*LThreadGroup) Test

func (g *LThreadGroup) Test(v Value, state RecTestCallState) bool

func (*LThreadGroup) WaitAllResults

func (g *LThreadGroup) WaitAllResults(ctx *Context) (*Array, *Error)

func (*LThreadGroup) WidestOfType

func (g *LThreadGroup) WidestOfType() Value

type LengthCheckingStringPattern

type LengthCheckingStringPattern struct {
	SerializableMixin
	NotCallablePatternMixin
	// contains filtered or unexported fields
}

An LengthCheckingStringPattern represents a symbolic LengthCheckingStringPattern

func NewLengthCheckingStringPattern

func NewLengthCheckingStringPattern(minLength, maxLength int64) *LengthCheckingStringPattern

func (*LengthCheckingStringPattern) HasRegex

func (p *LengthCheckingStringPattern) HasRegex() bool

func (*LengthCheckingStringPattern) HasUnderlyingPattern

func (p *LengthCheckingStringPattern) HasUnderlyingPattern() bool

func (*LengthCheckingStringPattern) IsMutable

func (patt *LengthCheckingStringPattern) IsMutable() bool

func (*LengthCheckingStringPattern) IteratorElementKey

func (p *LengthCheckingStringPattern) IteratorElementKey() Value

func (*LengthCheckingStringPattern) IteratorElementValue

func (p *LengthCheckingStringPattern) IteratorElementValue() Value

func (*LengthCheckingStringPattern) MatchGroups

func (p *LengthCheckingStringPattern) MatchGroups(v Value) (bool, map[string]Value)

func (*LengthCheckingStringPattern) PrettyPrint

func (*LengthCheckingStringPattern) StringPattern

func (p *LengthCheckingStringPattern) StringPattern() (StringPattern, bool)

func (*LengthCheckingStringPattern) SymbolicValue

func (p *LengthCheckingStringPattern) SymbolicValue() Value

func (*LengthCheckingStringPattern) Test

func (*LengthCheckingStringPattern) TestValue

func (p *LengthCheckingStringPattern) TestValue(v Value, state RecTestCallState) bool

func (*LengthCheckingStringPattern) WidestOfType

func (p *LengthCheckingStringPattern) WidestOfType() Value

type LifetimeJob

type LifetimeJob struct {
	UnassignablePropsMixin
	SerializableMixin
	// contains filtered or unexported fields
}

A LifetimeJob represents a symbolic LifetimeJob.

func NewLifetimeJob

func NewLifetimeJob(subjectPattern Pattern) *LifetimeJob

func (*LifetimeJob) GetGoMethod

func (j *LifetimeJob) GetGoMethod(name string) (*GoFunction, bool)

func (*LifetimeJob) IsMutable

func (e *LifetimeJob) IsMutable() bool

func (*LifetimeJob) PrettyPrint

func (r *LifetimeJob) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*LifetimeJob) Prop

func (j *LifetimeJob) Prop(name string) Value

func (*LifetimeJob) PropertyNames

func (*LifetimeJob) PropertyNames() []string

func (*LifetimeJob) Test

func (j *LifetimeJob) Test(v Value, state RecTestCallState) bool

func (*LifetimeJob) WidestOfType

func (j *LifetimeJob) WidestOfType() Value

type LineCount

type LineCount struct {
	SerializableMixin
	ComparableMixin
	// contains filtered or unexported fields
}

func NewLineCount

func NewLineCount(v int64) *LineCount

func (*LineCount) Concretize

func (c *LineCount) Concretize(ctx ConcreteContext) any

func (*LineCount) Int64

func (c *LineCount) Int64() (i *Int, signed bool)

func (*LineCount) IsConcretizable

func (c *LineCount) IsConcretizable() bool

func (LineCount) IsMutable

func (count LineCount) IsMutable() bool

func (*LineCount) PrettyPrint

func (c *LineCount) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*LineCount) Static

func (c *LineCount) Static() Pattern

func (*LineCount) Test

func (c *LineCount) Test(v Value, state RecTestCallState) bool

func (*LineCount) WidestOfType

func (c *LineCount) WidestOfType() Value

type List

type List struct {
	SerializableMixin
	ClonableSerializableMixin
	UnassignablePropsMixin
	// contains filtered or unexported fields
}

A List represents a symbolic List.

func NewList

func NewList(elements ...Serializable) *List

func NewListOf

func NewListOf(generalElement Serializable) *List

func NewReadonlyList

func NewReadonlyList(elements ...Serializable) *List

func (*List) Append

func (l *List) Append(ctx *Context, elements ...Serializable)

func (*List) Concretize

func (list *List) Concretize(ctx ConcreteContext) any

func (*List) Contains

func (l *List) Contains(value Serializable) (bool, bool)

func (*List) Dequeue

func (l *List) Dequeue(ctx *Context) Serializable

func (*List) Element

func (l *List) Element() Value

func (*List) ElementAt

func (l *List) ElementAt(i int) Value

func (*List) HasKnownLen

func (l *List) HasKnownLen() bool

func (*List) IsConcretizable

func (list *List) IsConcretizable() bool

func (*List) IsMutable

func (list *List) IsMutable() bool

func (*List) IsReadonly

func (list *List) IsReadonly() bool

func (*List) IteratorElementKey

func (l *List) IteratorElementKey() Value

func (*List) IteratorElementValue

func (l *List) IteratorElementValue() Value

func (*List) KnownLen

func (l *List) KnownLen() int

func (*List) Pop

func (l *List) Pop(ctx *Context) Serializable

func (*List) PrettyPrint

func (list *List) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*List) Prop

func (list *List) Prop(name string) Value

func (*List) PropertyNames

func (list *List) PropertyNames() []string

func (*List) SetSlice

func (l *List) SetSlice(ctx *Context, start, end *Int, v Sequence)

func (*List) SortBy

func (l *List) SortBy(ctx *Context, valuePath ValuePath, orderIdent *Identifier)

func (*List) Sorted

func (l *List) Sorted(ctx *Context, orderIdent *Identifier) *List

func (*List) Static

func (list *List) Static() Pattern

func (*List) Test

func (list *List) Test(v Value, state RecTestCallState) bool

func (*List) ToReadonly

func (list *List) ToReadonly() (PotentiallyReadonly, error)

func (*List) WatcherElement

func (l *List) WatcherElement() Value

func (*List) WidestOfType

func (l *List) WidestOfType() Value

type ListPattern

type ListPattern struct {
	NotCallablePatternMixin
	SerializableMixin
	// contains filtered or unexported fields
}

A ListPattern represents a symbolic ListPattern. .elements and .generalElement can never be both nil (nor both not nil).

func NewListPattern

func NewListPattern(elements []Pattern) *ListPattern

func NewListPatternOf

func NewListPatternOf(generalElement Pattern) *ListPattern

func (*ListPattern) Concretize

func (p *ListPattern) Concretize(ctx ConcreteContext) any

func (*ListPattern) HasUnderlyingPattern

func (p *ListPattern) HasUnderlyingPattern() bool

func (*ListPattern) IsConcretizable

func (p *ListPattern) IsConcretizable() bool

func (*ListPattern) IsMutable

func (patt *ListPattern) IsMutable() bool

func (*ListPattern) IsReadonlyPattern

func (p *ListPattern) IsReadonlyPattern() bool

func (*ListPattern) IteratorElementKey

func (p *ListPattern) IteratorElementKey() Value

func (*ListPattern) IteratorElementValue

func (p *ListPattern) IteratorElementValue() Value

func (*ListPattern) MigrationInitialValue

func (p *ListPattern) MigrationInitialValue() (Serializable, bool)

func (*ListPattern) PrettyPrint

func (p *ListPattern) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*ListPattern) StringPattern

func (p *ListPattern) StringPattern() (StringPattern, bool)

func (*ListPattern) SymbolicValue

func (p *ListPattern) SymbolicValue() Value

func (*ListPattern) Test

func (p *ListPattern) Test(v Value, state RecTestCallState) bool

func (*ListPattern) TestValue

func (p *ListPattern) TestValue(v Value, state RecTestCallState) bool

func (*ListPattern) ToReadonlyPattern

func (p *ListPattern) ToReadonlyPattern() (PotentiallyReadonlyPattern, error)

func (*ListPattern) WidestOfType

func (p *ListPattern) WidestOfType() Value

type LongValuePath

type LongValuePath struct {
	SerializableMixin
	// contains filtered or unexported fields
}

A LongValuePath represents a symbolic LongValuePath.

func NewLongValuePath

func NewLongValuePath(segments ...ValuePathSegment) *LongValuePath

func (*LongValuePath) Concretize

func (p *LongValuePath) Concretize(ctx ConcreteContext) any

func (*LongValuePath) GetFrom

func (p *LongValuePath) GetFrom(v Value) (result Value, alwaysPresent bool, err error)

func (*LongValuePath) IsConcretizable

func (p *LongValuePath) IsConcretizable() bool

func (LongValuePath) IsMutable

func (p LongValuePath) IsMutable() bool

func (*LongValuePath) PrettyPrint

func (p *LongValuePath) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*LongValuePath) Static

func (p *LongValuePath) Static() Pattern

func (*LongValuePath) Test

func (p *LongValuePath) Test(v Value, state RecTestCallState) bool

func (*LongValuePath) WidestOfType

func (p *LongValuePath) WidestOfType() Value

type Mapping

type Mapping struct {
	SerializableMixin
	// contains filtered or unexported fields
}

A Mapping represents a symbolic Mapping.

func NewMapping

func NewMapping() *Mapping

func (*Mapping) Compute

func (m *Mapping) Compute(ctx *Context, key Value) Value

func (*Mapping) GetGoMethod

func (m *Mapping) GetGoMethod(name string) (*GoFunction, bool)

func (*Mapping) IsMutable

func (m *Mapping) IsMutable() bool

func (*Mapping) IsSharable

func (m *Mapping) IsSharable() (bool, string)

func (*Mapping) IsShared

func (m *Mapping) IsShared() bool

func (*Mapping) IteratorElementKey

func (m *Mapping) IteratorElementKey() Value

func (*Mapping) IteratorElementValue

func (m *Mapping) IteratorElementValue() Value

func (*Mapping) PrettyPrint

func (m *Mapping) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Mapping) Prop

func (m *Mapping) Prop(name string) Value

func (*Mapping) PropertyNames

func (*Mapping) PropertyNames() []string

func (*Mapping) SetProp

func (m *Mapping) SetProp(name string, value Value) (IProps, error)

func (*Mapping) Share

func (m *Mapping) Share(originState *State) PotentiallySharable

func (*Mapping) Test

func (m *Mapping) Test(v Value, state RecTestCallState) bool

func (*Mapping) WidestOfType

func (m *Mapping) WidestOfType() Value

func (*Mapping) WithExistingPropReplaced

func (m *Mapping) WithExistingPropReplaced(name string, value Value) (IProps, error)

type MatchingValueExample

type MatchingValueExample struct {
	Value             Value
	AdditionalMessage string
}

type MatchingValueExampleProvider

type MatchingValueExampleProvider interface {
	Value

	Examples(cctx ExampleComputationContext) []MatchingValueExample
}

type Message

type Message struct {
	UnassignablePropsMixin
	// contains filtered or unexported fields
}

An Message represents a symbolic Message.

func (*Message) IsMutable

func (*Message) IsMutable() bool

func (*Message) PrettyPrint

func (m *Message) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Message) Prop

func (m *Message) Prop(name string) Value

func (*Message) PropertyNames

func (m *Message) PropertyNames() []string

func (*Message) ReceiveMessage

func (m *Message) ReceiveMessage(Value) error

func (*Message) Test

func (m *Message) Test(v Value, state RecTestCallState) bool

func (*Message) WidestOfType

func (m *Message) WidestOfType() Value

type MessageReceiver

type MessageReceiver interface {
	Value
	ReceiveMessage(Value) error
}

An MessageReceiver represents a symbolic MessageReceiver.

type MigrationInitialValueCapablePattern

type MigrationInitialValueCapablePattern interface {
	//MigrationInitialValue returns the initial value accepted by the pattern for initialization.
	MigrationInitialValue() (Serializable, bool)
}

type MigrationMixin

type MigrationMixin struct {
	PseudoPath string
}

func (MigrationMixin) GetPseudoPath

func (m MigrationMixin) GetPseudoPath() string

type MigrationOp

type MigrationOp interface {
	GetPseudoPath() string
}

type Mimetype

type Mimetype struct {
	SerializableMixin
	// contains filtered or unexported fields
}

A Mimetype represents a symbolic Mimetype.

func NewMimetype

func NewMimetype(v string) *Mimetype

func (Mimetype) IsMutable

func (mt Mimetype) IsMutable() bool

func (*Mimetype) PrettyPrint

func (m *Mimetype) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Mimetype) Static

func (m *Mimetype) Static() Pattern

func (*Mimetype) Test

func (m *Mimetype) Test(v Value, state RecTestCallState) bool

func (*Mimetype) WidestOfType

func (m *Mimetype) WidestOfType() Value

type Module

type Module struct {
	// contains filtered or unexported fields
}

A Module represents a symbolic Module.

func NewModule

func NewModule(
	chunk *parse.ParsedChunkSource,
	inclusionStatementMap map[*parse.InclusionImportStatement]*IncludedChunk,
	importedModuleMap map[*parse.ImportStatement]*Module,
) *Module

func (*Module) GetGoMethod

func (m *Module) GetGoMethod(name string) (*GoFunction, bool)

func (*Module) GetLineColumn

func (mod *Module) GetLineColumn(node parse.Node) (int32, int32)

func (*Module) IsMutable

func (m *Module) IsMutable() bool

func (*Module) Name

func (mod *Module) Name() string

func (*Module) PrettyPrint

func (m *Module) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Module) Prop

func (m *Module) Prop(name string) Value

func (*Module) PropertyNames

func (*Module) PropertyNames() []string

func (*Module) SetProp

func (m *Module) SetProp(name string, value Value) (IProps, error)

func (*Module) Test

func (m *Module) Test(v Value, state RecTestCallState) bool

func (*Module) WidestOfType

func (m *Module) WidestOfType() Value

func (*Module) WithExistingPropReplaced

func (m *Module) WithExistingPropReplaced(name string, value Value) (IProps, error)

type ModuleArgs

type ModuleArgs struct {
	// contains filtered or unexported fields
}

A ModuleArgs represents a symbolic ModuleArgs.

func NewModuleArgs

func NewModuleArgs(paramsPattern *ModuleParamsPattern, fieldValues map[string]Value) *ModuleArgs

func (*ModuleArgs) IsMutable

func (s *ModuleArgs) IsMutable() bool

func (*ModuleArgs) PrettyPrint

func (args *ModuleArgs) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*ModuleArgs) Prop

func (args *ModuleArgs) Prop(name string) Value

func (*ModuleArgs) PropertyNames

func (args *ModuleArgs) PropertyNames() []string

func (*ModuleArgs) SetProp

func (args *ModuleArgs) SetProp(name string, value Value) (IProps, error)

func (*ModuleArgs) Test

func (args *ModuleArgs) Test(v Value, state RecTestCallState) bool

func (*ModuleArgs) WidestOfType

func (args *ModuleArgs) WidestOfType() Value

func (*ModuleArgs) WithExistingPropReplaced

func (args *ModuleArgs) WithExistingPropReplaced(name string, value Value) (IProps, error)

type ModuleCompileTimeTypes

type ModuleCompileTimeTypes struct {
	// contains filtered or unexported fields
}

func NewModuleCompileTimeTypes

func NewModuleCompileTimeTypes() *ModuleCompileTimeTypes

func (*ModuleCompileTimeTypes) DefineType

func (t *ModuleCompileTimeTypes) DefineType(name string, typ CompileTimeType)

func (*ModuleCompileTimeTypes) GetPointerType

func (t *ModuleCompileTimeTypes) GetPointerType(valueTypename string) (*PointerType, bool)

func (*ModuleCompileTimeTypes) GetType

func (t *ModuleCompileTimeTypes) GetType(typename string) (CompileTimeType, bool)

func (*ModuleCompileTimeTypes) IsTypeDefined

func (t *ModuleCompileTimeTypes) IsTypeDefined(name string) bool

type ModuleParamsPattern

type ModuleParamsPattern struct {
	// contains filtered or unexported fields
}

A ModuleParamsPattern represents a symbolic ModuleParamsPattern.

func CreateModuleParamsPattern

func CreateModuleParamsPattern(keys []string, types []Pattern) ModuleParamsPattern

CreateModuleParamsPattern does not return a pointer on purpose.

func NewModuleParamsPattern

func NewModuleParamsPattern(keys []string, types []Pattern) *ModuleParamsPattern

func (*ModuleParamsPattern) IsMutable

func (*ModuleParamsPattern) IsMutable() bool

func (*ModuleParamsPattern) PrettyPrint

func (*ModuleParamsPattern) Test

func (p *ModuleParamsPattern) Test(v Value, state RecTestCallState) bool

func (*ModuleParamsPattern) WidestOfType

func (p *ModuleParamsPattern) WidestOfType() Value

type Multivalue

type Multivalue struct {
	// contains filtered or unexported fields
}

A Multivalue represents a set of possible values.

func NewMultivalue

func NewMultivalue(values ...Value) *Multivalue

func NewStringMultivalue

func NewStringMultivalue(strings ...string) *Multivalue

func (*Multivalue) AllValues

func (mv *Multivalue) AllValues(callbackFn func(v Value) bool) bool

func (*Multivalue) IsMutable

func (mv *Multivalue) IsMutable() bool

func (*Multivalue) OriginalMultivalue

func (m *Multivalue) OriginalMultivalue() *Multivalue

func (*Multivalue) PrettyPrint

func (mv *Multivalue) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Multivalue) Test

func (mv *Multivalue) Test(v Value, state RecTestCallState) bool

func (*Multivalue) TransformsValues

func (mv *Multivalue) TransformsValues(transform func(v Value) Value) Value

MapValues calls transform on all values in mv, the resulting values are joined.

func (*Multivalue) WidenSimpleValues

func (mv *Multivalue) WidenSimpleValues() Value

func (*Multivalue) WidestOfType

func (mv *Multivalue) WidestOfType() Value

type MutableLengthSequence

type MutableLengthSequence interface {
	MutableSequence
	// contains filtered or unexported methods
}

type MutableSequence

type MutableSequence interface {
	Sequence

	SetSlice(ctx *Context, start, end *Int, v Sequence)
	// contains filtered or unexported methods
}

type Mutation

type Mutation struct {
	// contains filtered or unexported fields
}

An Mutation represents a symbolic Mutation.

func (Mutation) IsMutable

func (w Mutation) IsMutable() bool

func (*Mutation) PrettyPrint

func (r *Mutation) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Mutation) Test

func (r *Mutation) Test(v Value, state RecTestCallState) bool

func (*Mutation) WidestOfType

func (r *Mutation) WidestOfType() Value

type MutationPattern

type MutationPattern struct {
	NotCallablePatternMixin
	SerializableMixin
	// contains filtered or unexported fields
}

A MutationPattern represents a symbolic MutationPattern. (work in progress)

func NewMutationPattern

func NewMutationPattern(kind *Int, data0Pattern Pattern) *MutationPattern

func (*MutationPattern) HasUnderlyingPattern

func (p *MutationPattern) HasUnderlyingPattern() bool

func (*MutationPattern) IsMutable

func (patt *MutationPattern) IsMutable() bool

func (*MutationPattern) IteratorElementKey

func (p *MutationPattern) IteratorElementKey() Value

func (*MutationPattern) IteratorElementValue

func (p *MutationPattern) IteratorElementValue() Value

func (*MutationPattern) PrettyPrint

func (*MutationPattern) StringPattern

func (p *MutationPattern) StringPattern() (StringPattern, bool)

func (*MutationPattern) SymbolicValue

func (p *MutationPattern) SymbolicValue() Value

func (*MutationPattern) Test

func (p *MutationPattern) Test(v Value, state RecTestCallState) bool

func (*MutationPattern) TestValue

func (p *MutationPattern) TestValue(v Value, state RecTestCallState) bool

func (*MutationPattern) WidestOfType

func (p *MutationPattern) WidestOfType() Value

type NamedPatternData

type NamedPatternData struct {
	Name               string
	Value              Pattern
	DefinitionPosition parse.SourcePositionRange
}

type NamedSegmentPathPattern

type NamedSegmentPathPattern struct {
	UnassignablePropsMixin
	NotCallablePatternMixin
	SerializableMixin
	// contains filtered or unexported fields
}

A NamedSegmentPathPattern represents a symbolic NamedSegmentPathPattern.

func (NamedSegmentPathPattern) HasUnderlyingPattern

func (p NamedSegmentPathPattern) HasUnderlyingPattern() bool

func (*NamedSegmentPathPattern) IsMutable

func (patt *NamedSegmentPathPattern) IsMutable() bool

func (*NamedSegmentPathPattern) IteratorElementKey

func (p *NamedSegmentPathPattern) IteratorElementKey() Value

func (*NamedSegmentPathPattern) IteratorElementValue

func (p *NamedSegmentPathPattern) IteratorElementValue() Value

func (*NamedSegmentPathPattern) MatchGroups

func (p *NamedSegmentPathPattern) MatchGroups(v Value) (bool, map[string]Serializable)

func (*NamedSegmentPathPattern) PrettyPrint

func (*NamedSegmentPathPattern) Prop

func (*NamedSegmentPathPattern) Prop(name string) Value

func (*NamedSegmentPathPattern) PropertyNames

func (p *NamedSegmentPathPattern) PropertyNames() []string

func (*NamedSegmentPathPattern) StringPattern

func (p *NamedSegmentPathPattern) StringPattern() (StringPattern, bool)

func (*NamedSegmentPathPattern) SymbolicValue

func (p *NamedSegmentPathPattern) SymbolicValue() Value

func (*NamedSegmentPathPattern) Test

func (*NamedSegmentPathPattern) TestValue

func (p *NamedSegmentPathPattern) TestValue(v Value, state RecTestCallState) bool

func (*NamedSegmentPathPattern) WidestOfType

func (p *NamedSegmentPathPattern) WidestOfType() Value

type Namespace

type Namespace struct {
	UnassignablePropsMixin
	// contains filtered or unexported fields
}

A Namespace represents a symbolic Namespace.

func NewEmptyMutableEntriesNamespace

func NewEmptyMutableEntriesNamespace() *Namespace

func NewEmptyNamespace

func NewEmptyNamespace() *Namespace

func NewMutableEntriesNamespace

func NewMutableEntriesNamespace(entries map[string]Value) *Namespace

func NewNamespace

func NewNamespace(entries map[string]Value) *Namespace

func (*Namespace) IsMutable

func (ns *Namespace) IsMutable() bool

func (*Namespace) PrettyPrint

func (ns *Namespace) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Namespace) Prop

func (ns *Namespace) Prop(name string) Value

func (*Namespace) PropertyNames

func (ns *Namespace) PropertyNames() []string

func (*Namespace) Test

func (ns *Namespace) Test(v Value, state RecTestCallState) bool

func (*Namespace) WidestOfType

func (ns *Namespace) WidestOfType() Value

type Never

type Never struct {
	// contains filtered or unexported fields
}

A Never represents a SymbolicValue that does not match against any value.

func (Never) IsMutable

func (Never) IsMutable() bool

func (*Never) PrettyPrint

func (*Never) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Never) Test

func (*Never) Test(v Value, state RecTestCallState) bool

func (*Never) WidestOfType

func (*Never) WidestOfType() Value

type NilT

type NilT struct {
	SerializableMixin
}

A NilT represents a symbolic NilT.

func (*NilT) Concretize

func (*NilT) Concretize(ctx ConcreteContext) any

func (*NilT) IsConcretizable

func (*NilT) IsConcretizable() bool

func (NilT) IsMutable

func (Nil NilT) IsMutable() bool

func (*NilT) PrettyPrint

func (n *NilT) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*NilT) Test

func (n *NilT) Test(v Value, state RecTestCallState) bool

func (*NilT) WidestOfType

func (n *NilT) WidestOfType() Value

type NillableInitializationMigrationOp

type NillableInitializationMigrationOp struct {
	Value Pattern
	MigrationMixin
}

type NotCallablePatternMixin

type NotCallablePatternMixin struct {
}

func (NotCallablePatternMixin) Call

func (NotCallablePatternMixin) Call(ctx *Context, values []Value) (Pattern, error)

type Object

type Object struct {
	SerializableMixin
	// contains filtered or unexported fields
}

func NewAnyObject

func NewAnyObject() *Object

func NewEmptyObject

func NewEmptyObject() *Object

func NewEmptyReadonlyObject

func NewEmptyReadonlyObject() *Object

func NewExactObject

func NewExactObject(entries map[string]Serializable, optionalEntries map[string]struct{}, static map[string]Pattern) *Object

func NewExactObject2

func NewExactObject2(entries map[string]Serializable) *Object

func NewInexactObject

func NewInexactObject(entries map[string]Serializable, optionalEntries map[string]struct{}, static map[string]Pattern) *Object

func NewInexactObject2

func NewInexactObject2(entries map[string]Serializable) *Object

func NewObject

func NewObject(exact bool, entries map[string]Serializable, optionalEntries map[string]struct{}, static map[string]Pattern) *Object

func NewUnitializedObject

func NewUnitializedObject() *Object

func (*Object) AddStatic

func (obj *Object) AddStatic(pattern Pattern) (StaticDataHolder, error)

func (*Object) Concretize

func (o *Object) Concretize(ctx ConcreteContext) any

func (*Object) Contains

func (o *Object) Contains(value Serializable) (bool, bool)

func (*Object) Element

func (o *Object) Element() Value

func (*Object) Examples

func (*Object) ForEachEntry

func (obj *Object) ForEachEntry(fn func(propName string, propValue Value) error) error

func (*Object) GetProperty

func (obj *Object) GetProperty(name string) (Value, Pattern, bool)

result should not be modfied

func (*Object) IsConcretizable

func (o *Object) IsConcretizable() bool

func (*Object) IsExistingPropertyOptional

func (obj *Object) IsExistingPropertyOptional(name string) bool

IsExistingPropertyOptional returns true if the property is part of the pattern and is optional

func (*Object) IsInexact

func (o *Object) IsInexact() bool

func (*Object) IsMutable

func (obj *Object) IsMutable() bool

func (*Object) IsReadonly

func (o *Object) IsReadonly() bool

func (*Object) IsSharable

func (obj *Object) IsSharable() (bool, string)

func (*Object) IsShared

func (obj *Object) IsShared() bool

func (*Object) IteratorElementKey

func (o *Object) IteratorElementKey() Value

func (*Object) IteratorElementValue

func (o *Object) IteratorElementValue() Value

func (*Object) MatchAnyObject

func (obj *Object) MatchAnyObject() bool

func (*Object) OptionalPropertyNames

func (obj *Object) OptionalPropertyNames() []string

func (*Object) PrettyPrint

func (obj *Object) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Object) Prop

func (obj *Object) Prop(name string) Value

func (*Object) PropertyNames

func (obj *Object) PropertyNames() []string

func (*Object) ReadonlyObject

func (o *Object) ReadonlyObject() *Object

func (*Object) ReceiveMessage

func (*Object) ReceiveMessage(Value) error

func (*Object) ReceivePublication

func (obj *Object) ReceivePublication(pub *Publication) error

func (*Object) SerializableEntryMap

func (obj *Object) SerializableEntryMap() map[string]Serializable

func (*Object) SetProp

func (obj *Object) SetProp(name string, value Value) (IProps, error)

func (*Object) Share

func (obj *Object) Share(originState *State) PotentiallySharable

func (*Object) SpecificIntersection

func (o *Object) SpecificIntersection(v Value, depth int) (Value, error)

func (*Object) Static

func (obj *Object) Static() Pattern

func (*Object) Test

func (obj *Object) Test(v Value, state RecTestCallState) bool

func (*Object) TestExact

func (obj *Object) TestExact(v Value) bool

func (*Object) ToReadonly

func (o *Object) ToReadonly() (PotentiallyReadonly, error)

func (*Object) URL

func (o *Object) URL() (*URL, bool)

func (*Object) ValueEntryMap

func (obj *Object) ValueEntryMap() map[string]Value

func (*Object) WatcherElement

func (o *Object) WatcherElement() Value

func (*Object) WidestOfType

func (o *Object) WidestOfType() Value

func (*Object) WithExistingPropReplaced

func (obj *Object) WithExistingPropReplaced(name string, value Value) (IProps, error)

func (*Object) WithURL

func (o *Object) WithURL(url *URL) UrlHolder

type ObjectPattern

type ObjectPattern struct {
	NotCallablePatternMixin
	SerializableMixin
	// contains filtered or unexported fields
}

An ObjectPattern represents a symbolic ObjectPattern.

func NewAnyObjectPattern

func NewAnyObjectPattern() *ObjectPattern

func NewExactObjectPattern

func NewExactObjectPattern(entries map[string]Pattern, optionalEntries map[string]struct{}) *ObjectPattern

func NewInexactObjectPattern

func NewInexactObjectPattern(entries map[string]Pattern, optionalEntries map[string]struct{}) *ObjectPattern

func NewObjectPattern

func NewObjectPattern(exact bool, entries map[string]Pattern, optionalEntries map[string]struct{}) *ObjectPattern

func NewUnitializedObjectPattern

func NewUnitializedObjectPattern() *ObjectPattern

func (*ObjectPattern) Concretize

func (p *ObjectPattern) Concretize(ctx ConcreteContext) any

func (*ObjectPattern) ForEachEntry

func (patt *ObjectPattern) ForEachEntry(fn func(propName string, propPattern Pattern, isOptional bool) error) error

func (*ObjectPattern) HasUnderlyingPattern

func (p *ObjectPattern) HasUnderlyingPattern() bool

func (*ObjectPattern) IsConcretizable

func (patt *ObjectPattern) IsConcretizable() bool

func (*ObjectPattern) IsMutable

func (patt *ObjectPattern) IsMutable() bool

func (*ObjectPattern) IsReadonlyPattern

func (o *ObjectPattern) IsReadonlyPattern() bool

func (*ObjectPattern) IteratorElementKey

func (p *ObjectPattern) IteratorElementKey() Value

func (*ObjectPattern) IteratorElementValue

func (p *ObjectPattern) IteratorElementValue() Value

func (*ObjectPattern) MigrationInitialValue

func (p *ObjectPattern) MigrationInitialValue() (Serializable, bool)

func (*ObjectPattern) PrettyPrint

func (p *ObjectPattern) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*ObjectPattern) StringPattern

func (p *ObjectPattern) StringPattern() (StringPattern, bool)

func (*ObjectPattern) SymbolicValue

func (p *ObjectPattern) SymbolicValue() Value

func (*ObjectPattern) Test

func (p *ObjectPattern) Test(v Value, state RecTestCallState) bool

func (*ObjectPattern) TestValue

func (p *ObjectPattern) TestValue(v Value, state RecTestCallState) bool

func (*ObjectPattern) ToReadonlyPattern

func (o *ObjectPattern) ToReadonlyPattern() (PotentiallyReadonlyPattern, error)

func (*ObjectPattern) ToRecordPattern

func (p *ObjectPattern) ToRecordPattern() *RecordPattern

func (*ObjectPattern) ValuePropPattern

func (p *ObjectPattern) ValuePropPattern(name string) (propPattern Pattern, isOptional bool, ok bool)

func (*ObjectPattern) ValuePropertyNames

func (p *ObjectPattern) ValuePropertyNames() []string

func (*ObjectPattern) WidestOfType

func (p *ObjectPattern) WidestOfType() Value

func (*ObjectPattern) WithExactValuePatternsRemoved

func (p *ObjectPattern) WithExactValuePatternsRemoved() (Pattern, error)

type Option

type Option struct {
	SerializableMixin
	ClonableSerializableMixin
	// contains filtered or unexported fields
}

An Option represents a symbolic Option.

func NewAnyNameOption

func NewAnyNameOption(value Value) *Option

func NewOption

func NewOption(name string, value Value) *Option

func (*Option) Concretize

func (o *Option) Concretize(ctx ConcreteContext) any

func (*Option) IsConcretizable

func (o *Option) IsConcretizable() bool

func (Option) IsMutable

func (opt Option) IsMutable() bool

func (*Option) Name

func (o *Option) Name() (string, bool)

func (*Option) PrettyPrint

func (o *Option) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Option) Test

func (o *Option) Test(v Value, state RecTestCallState) bool

func (*Option) WidestOfType

func (o *Option) WidestOfType() Value

type OptionPattern

type OptionPattern struct {
	NotCallablePatternMixin
	SerializableMixin
	// contains filtered or unexported fields
}

A OptionPattern represents a symbolic OptionPattern.

func NewOptionPattern

func NewOptionPattern(name string, pattern Pattern) *OptionPattern

func (*OptionPattern) HasUnderlyingPattern

func (p *OptionPattern) HasUnderlyingPattern() bool

func (*OptionPattern) IsMutable

func (patt *OptionPattern) IsMutable() bool

func (*OptionPattern) IteratorElementKey

func (p *OptionPattern) IteratorElementKey() Value

func (*OptionPattern) IteratorElementValue

func (p *OptionPattern) IteratorElementValue() Value

func (*OptionPattern) PrettyPrint

func (p *OptionPattern) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*OptionPattern) StringPattern

func (p *OptionPattern) StringPattern() (StringPattern, bool)

func (*OptionPattern) SymbolicValue

func (p *OptionPattern) SymbolicValue() Value

func (*OptionPattern) Test

func (p *OptionPattern) Test(v Value, state RecTestCallState) bool

func (*OptionPattern) TestValue

func (p *OptionPattern) TestValue(v Value, state RecTestCallState) bool

func (*OptionPattern) WidestOfType

func (p *OptionPattern) WidestOfType() Value

type OptionalIProps

type OptionalIProps interface {
	IProps
	OptionalPropertyNames() []string
}

type OptionalParam

type OptionalParam[T Value] struct {
	Value *T //nil if argument is not provided
}

optional parameter in symbolic Go function parameters

type OptionalPattern

type OptionalPattern struct {
	NotCallablePatternMixin
	SerializableMixin
	// contains filtered or unexported fields
}

func NewOptionalPattern

func NewOptionalPattern(p Pattern) *OptionalPattern

func (*OptionalPattern) HasUnderlyingPattern

func (p *OptionalPattern) HasUnderlyingPattern() bool

func (*OptionalPattern) IsMutable

func (pattern *OptionalPattern) IsMutable() bool

func (*OptionalPattern) IteratorElementKey

func (p *OptionalPattern) IteratorElementKey() Value

func (*OptionalPattern) IteratorElementValue

func (p *OptionalPattern) IteratorElementValue() Value

func (*OptionalPattern) PrettyPrint

func (*OptionalPattern) StringPattern

func (p *OptionalPattern) StringPattern() (StringPattern, bool)

func (*OptionalPattern) SymbolicValue

func (p *OptionalPattern) SymbolicValue() Value

func (*OptionalPattern) Test

func (p *OptionalPattern) Test(v Value, state RecTestCallState) bool

func (*OptionalPattern) TestValue

func (p *OptionalPattern) TestValue(v Value, state RecTestCallState) bool

func (*OptionalPattern) WidestOfType

func (p *OptionalPattern) WidestOfType() Value

type Order

type Order int
const (
	AscendingOrder Order = iota + 1
	DescendingOrder
	LexicographicOrder
	ReverseLexicographicOrder
)

func OrderFromString

func OrderFromString(name string) (Order, bool)

type OrderedPair

type OrderedPair struct {
	SerializableMixin
	// contains filtered or unexported fields
}

A OrderedPair represents a symbolic OrderedPair.

func NewOrderedPair

func NewOrderedPair(first, second Serializable) *OrderedPair

func NewUnitializedOrderedPair

func NewUnitializedOrderedPair() *OrderedPair

func (*OrderedPair) Concretize

func (t *OrderedPair) Concretize(ctx ConcreteContext) any

func (*OrderedPair) Contains

func (p *OrderedPair) Contains(value Serializable) (bool, bool)

func (*OrderedPair) Element

func (t *OrderedPair) Element() Value

func (*OrderedPair) ElementAt

func (t *OrderedPair) ElementAt(i int) Value

func (*OrderedPair) HasKnownLen

func (t *OrderedPair) HasKnownLen() bool

func (*OrderedPair) IsConcretizable

func (p *OrderedPair) IsConcretizable() bool

func (*OrderedPair) IsMutable

func (tuple *OrderedPair) IsMutable() bool

func (*OrderedPair) IteratorElementKey

func (t *OrderedPair) IteratorElementKey() Value

func (*OrderedPair) IteratorElementValue

func (t *OrderedPair) IteratorElementValue() Value

func (*OrderedPair) KnownLen

func (t *OrderedPair) KnownLen() int

func (*OrderedPair) PrettyPrint

func (t *OrderedPair) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*OrderedPair) Static

func (t *OrderedPair) Static() Pattern

func (*OrderedPair) Test

func (p *OrderedPair) Test(v Value, state RecTestCallState) bool

func (*OrderedPair) WidestOfType

func (t *OrderedPair) WidestOfType() Value

type ParserBasedPattern

type ParserBasedPattern struct {
	SerializableMixin
	NotCallablePatternMixin
}

An ParserBasedPattern represents a symbolic ParserBasedPattern

func NewParserBasedPattern

func NewParserBasedPattern() *ParserBasedPattern

func (*ParserBasedPattern) HasRegex

func (p *ParserBasedPattern) HasRegex() bool

func (*ParserBasedPattern) HasUnderlyingPattern

func (p *ParserBasedPattern) HasUnderlyingPattern() bool

func (*ParserBasedPattern) IsMutable

func (patt *ParserBasedPattern) IsMutable() bool

func (*ParserBasedPattern) IteratorElementKey

func (p *ParserBasedPattern) IteratorElementKey() Value

func (*ParserBasedPattern) IteratorElementValue

func (p *ParserBasedPattern) IteratorElementValue() Value

func (*ParserBasedPattern) PrettyPrint

func (*ParserBasedPattern) StringPattern

func (p *ParserBasedPattern) StringPattern() (StringPattern, bool)

func (*ParserBasedPattern) SymbolicValue

func (p *ParserBasedPattern) SymbolicValue() Value

func (*ParserBasedPattern) Test

func (p *ParserBasedPattern) Test(v Value, state RecTestCallState) bool

func (*ParserBasedPattern) TestValue

func (p *ParserBasedPattern) TestValue(v Value, state RecTestCallState) bool

func (*ParserBasedPattern) WidestOfType

func (p *ParserBasedPattern) WidestOfType() Value

type Path

type Path struct {
	UnassignablePropsMixin
	SerializableMixin
	// contains filtered or unexported fields
}

A Path represents a symbolic Path.

func NewPath

func NewPath(v string) *Path

func NewPathMatchingPattern

func NewPathMatchingPattern(p *PathPattern) *Path

func (*Path) Concretize

func (p *Path) Concretize(ctx ConcreteContext) any

func (*Path) Examples

func (*Path) IsConcretizable

func (p *Path) IsConcretizable() bool

func (Path) IsMutable

func (pth Path) IsMutable() bool

func (*Path) PrettyPrint

func (p *Path) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Path) Prop

func (p *Path) Prop(name string) Value

func (*Path) PropertyNames

func (p *Path) PropertyNames() []string

func (*Path) ResourceName

func (p *Path) ResourceName() *String

func (*Path) Static

func (p *Path) Static() Pattern

func (*Path) Test

func (p *Path) Test(v Value, state RecTestCallState) bool

func (*Path) WalkerElement

func (p *Path) WalkerElement() Value

func (*Path) WalkerNodeMeta

func (p *Path) WalkerNodeMeta() Value

func (*Path) WidestOfType

func (p *Path) WidestOfType() Value

type PathAbsoluteness

type PathAbsoluteness int
const (
	UnspecifiedPathAbsoluteness PathAbsoluteness = iota
	AbsolutePath
	RelativePath
)

type PathPattern

type PathPattern struct {
	NotCallablePatternMixin
	UnassignablePropsMixin
	SerializableMixin
	// contains filtered or unexported fields
}

A PathPattern represents a symbolic PathPattern.

func NewPathPattern

func NewPathPattern(v string) *PathPattern

func NewPathPatternFromNode

func NewPathPatternFromNode(n parse.Node, chunk *parse.Chunk) *PathPattern

func (*PathPattern) Concretize

func (p *PathPattern) Concretize(ctx ConcreteContext) any

func (*PathPattern) HasUnderlyingPattern

func (p *PathPattern) HasUnderlyingPattern() bool

func (*PathPattern) IsConcretizable

func (p *PathPattern) IsConcretizable() bool

func (PathPattern) IsMutable

func (patt PathPattern) IsMutable() bool

func (*PathPattern) IteratorElementKey

func (p *PathPattern) IteratorElementKey() Value

func (*PathPattern) IteratorElementValue

func (p *PathPattern) IteratorElementValue() Value

func (*PathPattern) PrettyPrint

func (p *PathPattern) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*PathPattern) Prop

func (*PathPattern) Prop(name string) Value

func (*PathPattern) PropertyNames

func (p *PathPattern) PropertyNames() []string

func (*PathPattern) Static

func (p *PathPattern) Static() Pattern

func (*PathPattern) StringPattern

func (p *PathPattern) StringPattern() (StringPattern, bool)

func (*PathPattern) SymbolicValue

func (p *PathPattern) SymbolicValue() Value

func (*PathPattern) Test

func (p *PathPattern) Test(v Value, state RecTestCallState) bool

func (*PathPattern) TestValue

func (p *PathPattern) TestValue(v Value, state RecTestCallState) bool

func (*PathPattern) WidestOfType

func (p *PathPattern) WidestOfType() Value

type Pattern

type Pattern interface {
	Serializable
	Iterable

	HasUnderlyingPattern() bool

	//equivalent of Test() for concrete patterns
	TestValue(v Value, state RecTestCallState) bool

	Call(ctx *Context, values []Value) (Pattern, error)

	//returns a symbolic value that represent all concrete values that match against this pattern
	SymbolicValue() Value

	StringPattern() (StringPattern, bool)
}

A Pattern represents a symbolic Pattern.

func NewMostAdaptedExactPattern

func NewMostAdaptedExactPattern(value Serializable) (Pattern, error)

func RemoveExactValuePatterns

func RemoveExactValuePatterns(p Pattern) (Pattern, error)

type PatternNamespace

type PatternNamespace struct {
	// contains filtered or unexported fields
}

A PatternNamespace represents a symbolic PatternNamespace.

func NewPatternNamespace

func NewPatternNamespace(patterns map[string]Pattern) *PatternNamespace

func (*PatternNamespace) ForEachPattern

func (ns *PatternNamespace) ForEachPattern(fn func(name string, patt Pattern) error) error

func (*PatternNamespace) IsMutable

func (ns *PatternNamespace) IsMutable() bool

func (*PatternNamespace) PrettyPrint

func (*PatternNamespace) Test

func (ns *PatternNamespace) Test(v Value, state RecTestCallState) bool

func (*PatternNamespace) WidestOfType

func (ns *PatternNamespace) WidestOfType() Value

type PatternNamespaceData

type PatternNamespaceData struct {
	Name               string
	Value              *PatternNamespace
	DefinitionPosition parse.SourcePositionRange
}

type PatternNext

type PatternNext interface {
	Pattern

	//WithExactValuePatternsRemoved should replace exact value patterns with the static type (pattern)
	//of their value.
	WithExactValuePatternsRemoved() (Pattern, error)
}

PatternNext is the interface that all patterns will implement in the future.

type Pointer

type Pointer struct {
	// contains filtered or unexported fields
}

func (*Pointer) IsMutable

func (*Pointer) IsMutable() bool

func (*Pointer) PrettyPrint

func (*Pointer) Test

func (p *Pointer) Test(v Value, state RecTestCallState) bool

func (*Pointer) Type

func (p *Pointer) Type() *PointerType

func (*Pointer) ValueType

func (p *Pointer) ValueType() CompileTimeType

func (*Pointer) WidestOfType

func (*Pointer) WidestOfType() Value

type PointerType

type PointerType struct {
	// contains filtered or unexported fields
}

func (*PointerType) Equal

func (t *PointerType) Equal(v CompileTimeType, state RecTestCallState) bool

func (*PointerType) PrettyPrint

func (t *PointerType) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*PointerType) SymbolicValue

func (t *PointerType) SymbolicValue() Value

func (*PointerType) TestValue

func (t *PointerType) TestValue(v Value, state RecTestCallState) bool

func (*PointerType) ValueType

func (t *PointerType) ValueType() CompileTimeType

type Port

type Port struct {
	ComparableMixin
	// contains filtered or unexported fields
}

A Port represents a symbolic Port.

func (Port) IsMutable

func (port Port) IsMutable() bool

func (*Port) PrettyPrint

func (p *Port) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Port) Static

func (p *Port) Static() Pattern

func (*Port) Test

func (p *Port) Test(v Value, state RecTestCallState) bool

func (*Port) WidestOfType

func (p *Port) WidestOfType() Value

type PotentiallyConcretizable

type PotentiallyConcretizable interface {
	IsConcretizable() bool
	Concretize(ctx ConcreteContext) any
}

type PotentiallyReadonly

type PotentiallyReadonly interface {
	Value
	IsReadonly() bool
	ToReadonly() (PotentiallyReadonly, error)
}

type PotentiallyReadonlyPattern

type PotentiallyReadonlyPattern interface {
	Pattern
	IsReadonlyPattern() bool
	ToReadonlyPattern() (PotentiallyReadonlyPattern, error)
}

type PotentiallySharable

type PotentiallySharable interface {
	Value
	IsSharable() (bool, string)
	// Share should be equivalent to concrete PotentiallySharable.Share, the only difference is that
	// it should NOT modify the value and should instead return a copy of the value but shared.
	Share(originState *State) PotentiallySharable
	IsShared() bool
}

type PrettyPrintArgs

type PrettyPrintArgs struct {
	Value interface {
		PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)
	}
	Writer                   io.Writer
	Config                   *pprint.PrettyPrintConfig
	Depth, ParentIndentCount int
	EnableRegions            bool //if false the returned region list is empty
}

type PropertyName

type PropertyName struct {
	SerializableMixin
	// contains filtered or unexported fields
}

A PropertyName represents a symbolic PropertyName.

func NewPropertyName

func NewPropertyName(name string) *PropertyName

func (*PropertyName) Concretize

func (n *PropertyName) Concretize(ctx ConcreteContext) any

func (*PropertyName) GetFrom

func (n *PropertyName) GetFrom(v Value) (Value, bool, error)

func (*PropertyName) IsConcretizable

func (n *PropertyName) IsConcretizable() bool

func (PropertyName) IsMutable

func (p PropertyName) IsMutable() bool

func (*PropertyName) Name

func (n *PropertyName) Name() string

func (*PropertyName) PrettyPrint

func (n *PropertyName) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*PropertyName) SegmentGetFrom

func (n *PropertyName) SegmentGetFrom(v Value) (Value, bool, error)

func (*PropertyName) Static

func (n *PropertyName) Static() Pattern

func (*PropertyName) Test

func (n *PropertyName) Test(v Value, state RecTestCallState) bool

func (*PropertyName) WidestOfType

func (n *PropertyName) WidestOfType() Value

type ProtocolClient

type ProtocolClient interface {
	Value
	Schemes() []string
}

A ProtocolClient represents a symbolic ProtocolClient;

type PseudoPropsValue

type PseudoPropsValue interface {
	Value
	PropertyNames() []string
	Prop(name string) Value
}

type Publication

type Publication struct {
	// contains filtered or unexported fields
}

An Publication represents a symbolic Publication.

func NewPublication

func NewPublication() *Publication

add parameters

func (*Publication) IsMutable

func (*Publication) IsMutable() bool

func (*Publication) PrettyPrint

func (r *Publication) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Publication) ReceivePublication

func (r *Publication) ReceivePublication(Value) error

func (*Publication) Test

func (r *Publication) Test(v Value, state RecTestCallState) bool

func (*Publication) WidestOfType

func (r *Publication) WidestOfType() Value

type QuantityRange

type QuantityRange struct {
	SerializableMixin
	// contains filtered or unexported fields
}

A QuantityRange represents a symbolic QuantityRange.

func NewQuantityRange

func NewQuantityRange(element Serializable) *QuantityRange

func (QuantityRange) Contains

func (r QuantityRange) Contains(value Serializable) (yes bool, possible bool)

func (QuantityRange) IsMutable

func (r QuantityRange) IsMutable() bool

func (*QuantityRange) IteratorElementKey

func (r *QuantityRange) IteratorElementKey() Value

func (*QuantityRange) IteratorElementValue

func (r *QuantityRange) IteratorElementValue() Value

func (*QuantityRange) PrettyPrint

func (r *QuantityRange) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*QuantityRange) Test

func (r *QuantityRange) Test(v Value, state RecTestCallState) bool

func (*QuantityRange) WidestOfType

func (r *QuantityRange) WidestOfType() Value

type RandomnessSource

type RandomnessSource struct {
	UnassignablePropsMixin
	// contains filtered or unexported fields
}

A RandomnessSource represents a symbolic RandomnessSource.

func (*RandomnessSource) Commit

func (r *RandomnessSource) Commit(cr *Context) *Error

func (*RandomnessSource) GetGoMethod

func (r *RandomnessSource) GetGoMethod(name string) (*GoFunction, bool)

func (*RandomnessSource) IsMutable

func (r *RandomnessSource) IsMutable() bool

func (*RandomnessSource) PrettyPrint

func (*RandomnessSource) Prop

func (r *RandomnessSource) Prop(name string) Value

func (*RandomnessSource) PropertyNames

func (r *RandomnessSource) PropertyNames() []string

func (*RandomnessSource) Rollback

func (r *RandomnessSource) Rollback(cr *Context) *Error

func (*RandomnessSource) Start

func (r *RandomnessSource) Start(cr *Context) *Error

func (*RandomnessSource) Test

func (r *RandomnessSource) Test(v Value, state RecTestCallState) bool

func (*RandomnessSource) WidestOfType

func (r *RandomnessSource) WidestOfType() Value

type Readable

type Readable interface {
	Value
	Reader() *Reader
}

A Readable represents a symbolic Readable.

type ReadableStream

type ReadableStream struct {
	// contains filtered or unexported fields
}

An ReadableStream represents a symbolic ReadableStream.

func NewReadableStream

func NewReadableStream(element Value) *ReadableStream

TODO: add chunk argument ?

func (*ReadableStream) ChunkedStreamElement

func (r *ReadableStream) ChunkedStreamElement() Value

func (*ReadableStream) IsMutable

func (s *ReadableStream) IsMutable() bool

func (*ReadableStream) PrettyPrint

func (r *ReadableStream) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*ReadableStream) StreamElement

func (r *ReadableStream) StreamElement() Value

func (*ReadableStream) Test

func (r *ReadableStream) Test(v Value, state RecTestCallState) bool

func (*ReadableStream) WidestOfType

func (r *ReadableStream) WidestOfType() Value

type Reader

type Reader struct {
	UnassignablePropsMixin
	// contains filtered or unexported fields
}

func (*Reader) GetGoMethod

func (reader *Reader) GetGoMethod(name string) (*GoFunction, bool)

func (*Reader) IsMutable

func (*Reader) IsMutable() bool

func (*Reader) PrettyPrint

func (r *Reader) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Reader) Prop

func (reader *Reader) Prop(name string) Value

func (Reader) PropertyNames

func (Reader) PropertyNames() []string

func (*Reader) ReadAll

func (reader *Reader) ReadAll() (*ByteSlice, *Error)

func (*Reader) ReadCtx

func (reader *Reader) ReadCtx(ctx *Context, b *ByteSlice) (*Int, *Error)

func (*Reader) Reader

func (reader *Reader) Reader() *Reader

func (*Reader) Test

func (r *Reader) Test(v Value, state RecTestCallState) bool

func (*Reader) WidestOfType

func (r *Reader) WidestOfType() Value

type RecTestCallState

type RecTestCallState struct {
	// contains filtered or unexported fields
}

func (*RecTestCallState) FinishCall

func (s *RecTestCallState) FinishCall()

func (*RecTestCallState) StartCall

func (s *RecTestCallState) StartCall()

type Record

type Record struct {
	UnassignablePropsMixin

	SerializableMixin
	// contains filtered or unexported fields
}

A Record represents a symbolic Record.

func NewAnyKeyRecord

func NewAnyKeyRecord(value Value) *Record

func NewAnyrecord

func NewAnyrecord() *Record

func NewBoundEntriesRecord

func NewBoundEntriesRecord(entries map[string]Serializable) *Record

func NewEmptyRecord

func NewEmptyRecord() *Record

func NewExactRecord

func NewExactRecord(entries map[string]Serializable, optionalEntries map[string]struct{}) *Record

func NewInexactRecord

func NewInexactRecord(entries map[string]Serializable, optionalEntries map[string]struct{}) *Record

func (*Record) Concretize

func (rec *Record) Concretize(ctx ConcreteContext) any

func (*Record) Contains

func (r *Record) Contains(value Serializable) (bool, bool)

func (*Record) ForEachEntry

func (rec *Record) ForEachEntry(fn func(k string, v Value) error) error

func (*Record) IsConcretizable

func (r *Record) IsConcretizable() bool

func (Record) IsMutable

func (rec Record) IsMutable() bool

func (*Record) IteratorElementKey

func (rec *Record) IteratorElementKey() Value

func (*Record) IteratorElementValue

func (rec *Record) IteratorElementValue() Value

func (*Record) OptionalPropertyNames

func (rec *Record) OptionalPropertyNames() []string

func (*Record) PrettyPrint

func (rec *Record) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Record) Prop

func (rec *Record) Prop(name string) Value

func (*Record) PropertyNames

func (rec *Record) PropertyNames() []string

func (*Record) Static

func (rec *Record) Static() Pattern

func (*Record) Test

func (rec *Record) Test(v Value, state RecTestCallState) bool

func (*Record) TestExact

func (rec *Record) TestExact(v Value) bool

func (*Record) ValueEntryMap

func (rec *Record) ValueEntryMap() map[string]Value

func (*Record) WidestOfType

func (r *Record) WidestOfType() Value

type RecordPattern

type RecordPattern struct {
	NotCallablePatternMixin
	SerializableMixin
	// contains filtered or unexported fields
}

An RecordPattern represents a symbolic RecordPattern.

func NewAnyRecordPattern

func NewAnyRecordPattern() *RecordPattern

func NewExactRecordPattern

func NewExactRecordPattern(entries map[string]Pattern, optionalEntries map[string]struct{}) *RecordPattern

func NewInexactRecordPattern

func NewInexactRecordPattern(entries map[string]Pattern, optionalEntries map[string]struct{}) *RecordPattern

func NewUnitializedRecordPattern

func NewUnitializedRecordPattern() *RecordPattern

func (*RecordPattern) Concretize

func (p *RecordPattern) Concretize(ctx ConcreteContext) any

func (*RecordPattern) HasUnderlyingPattern

func (p *RecordPattern) HasUnderlyingPattern() bool

func (*RecordPattern) IsConcretizable

func (p *RecordPattern) IsConcretizable() bool

func (*RecordPattern) IsMutable

func (patt *RecordPattern) IsMutable() bool

func (*RecordPattern) IteratorElementKey

func (p *RecordPattern) IteratorElementKey() Value

func (*RecordPattern) IteratorElementValue

func (p *RecordPattern) IteratorElementValue() Value

func (*RecordPattern) MigrationInitialValue

func (p *RecordPattern) MigrationInitialValue() (Serializable, bool)

func (*RecordPattern) PrettyPrint

func (p *RecordPattern) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*RecordPattern) StringPattern

func (p *RecordPattern) StringPattern() (StringPattern, bool)

func (*RecordPattern) SymbolicValue

func (p *RecordPattern) SymbolicValue() Value

func (*RecordPattern) Test

func (p *RecordPattern) Test(v Value, state RecTestCallState) bool

func (*RecordPattern) TestValue

func (p *RecordPattern) TestValue(v Value, state RecTestCallState) bool

func (*RecordPattern) ValuePropPattern

func (p *RecordPattern) ValuePropPattern(name string) (propPattern Pattern, isOptional bool, ok bool)

func (*RecordPattern) ValuePropertyNames

func (p *RecordPattern) ValuePropertyNames() []string

func (*RecordPattern) WidestOfType

func (p *RecordPattern) WidestOfType() Value

type RegexPattern

type RegexPattern struct {
	SerializableMixin
	NotCallablePatternMixin
	// contains filtered or unexported fields
}

A RegexPattern represents a symbolic RegexPattern.

func NewRegexPattern

func NewRegexPattern(s string) *RegexPattern

func (*RegexPattern) HasRegex

func (p *RegexPattern) HasRegex() bool

func (*RegexPattern) HasUnderlyingPattern

func (p *RegexPattern) HasUnderlyingPattern() bool

func (*RegexPattern) IsMutable

func (patt *RegexPattern) IsMutable() bool

func (*RegexPattern) IteratorElementKey

func (p *RegexPattern) IteratorElementKey() Value

func (*RegexPattern) IteratorElementValue

func (p *RegexPattern) IteratorElementValue() Value

func (*RegexPattern) PrettyPrint

func (p *RegexPattern) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*RegexPattern) StringPattern

func (p *RegexPattern) StringPattern() (StringPattern, bool)

func (*RegexPattern) SymbolicValue

func (p *RegexPattern) SymbolicValue() Value

func (*RegexPattern) Test

func (p *RegexPattern) Test(v Value, state RecTestCallState) bool

func (*RegexPattern) TestValue

func (p *RegexPattern) TestValue(v Value, state RecTestCallState) bool

func (*RegexPattern) WidestOfType

func (p *RegexPattern) WidestOfType() Value

type RemovalMigrationOp

type RemovalMigrationOp struct {
	Value Pattern
	MigrationMixin
}

type ReplacementMigrationOp

type ReplacementMigrationOp struct {
	Current, Next Pattern
	MigrationMixin
}

type ResourceName

type ResourceName interface {
	WrappedString
	ResourceName() *String
}

type RingBuffer

type RingBuffer struct {
	UnassignablePropsMixin
	// contains filtered or unexported fields
}

func (*RingBuffer) GetGoMethod

func (RingBuffer *RingBuffer) GetGoMethod(name string) (*GoFunction, bool)

func (*RingBuffer) IsMutable

func (r *RingBuffer) IsMutable() bool

func (*RingBuffer) IsSharable

func (r *RingBuffer) IsSharable() (bool, string)

func (*RingBuffer) IsShared

func (r *RingBuffer) IsShared() bool

func (*RingBuffer) PrettyPrint

func (r *RingBuffer) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*RingBuffer) Prop

func (RingBuffer *RingBuffer) Prop(name string) Value

func (RingBuffer) PropertyNames

func (RingBuffer) PropertyNames() []string

func (*RingBuffer) RingBuffer

func (RingBuffer *RingBuffer) RingBuffer() *RingBuffer

func (*RingBuffer) Share

func (r *RingBuffer) Share(originState *State) PotentiallySharable

func (*RingBuffer) Test

func (r *RingBuffer) Test(v Value, state RecTestCallState) bool

func (*RingBuffer) WidestOfType

func (r *RingBuffer) WidestOfType() Value

func (*RingBuffer) Writer

func (r *RingBuffer) Writer() *Writer

type RunTimeValue

type RunTimeValue struct {
	// contains filtered or unexported fields
}

A RunTimeValue represents a value that is not known.

func NewRunTimeValue

func NewRunTimeValue(value Value) *RunTimeValue

func (*RunTimeValue) IsMutable

func (rv *RunTimeValue) IsMutable() bool

func (*RunTimeValue) OriginalRunTimeValue

func (m *RunTimeValue) OriginalRunTimeValue() *RunTimeValue

func (*RunTimeValue) PrettyPrint

func (rv *RunTimeValue) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*RunTimeValue) Static

func (rv *RunTimeValue) Static() Pattern

func (*RunTimeValue) Test

func (rv *RunTimeValue) Test(v Value, state RecTestCallState) bool

func (*RunTimeValue) WidestOfType

func (rv *RunTimeValue) WidestOfType() Value

type Rune

type Rune struct {
	UnassignablePropsMixin
	SerializableMixin
	ComparableMixin
	// contains filtered or unexported fields
}

A Rune represents a symbolic Rune.

func NewRune

func NewRune(r rune) *Rune

func (*Rune) Concretize

func (r *Rune) Concretize(ctx ConcreteContext) any

func (*Rune) IsConcretizable

func (r *Rune) IsConcretizable() bool

func (Rune) IsMutable

func (r Rune) IsMutable() bool

func (*Rune) PrettyPrint

func (r *Rune) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Rune) Prop

func (r *Rune) Prop(name string) Value

func (*Rune) PropertyNames

func (r *Rune) PropertyNames() []string

func (*Rune) Static

func (r *Rune) Static() Pattern

func (*Rune) Test

func (r *Rune) Test(v Value, state RecTestCallState) bool

func (*Rune) WidestOfType

func (r *Rune) WidestOfType() Value

type RuneCount

type RuneCount struct {
	SerializableMixin
	ComparableMixin
	// contains filtered or unexported fields
}

A RuneCount represents a symbolic RuneCount.

func NewRuneCount

func NewRuneCount(v int64) *RuneCount

func (*RuneCount) Int64

func (c *RuneCount) Int64() (i *Int, signed bool)

func (*RuneCount) IsConcretizable

func (c *RuneCount) IsConcretizable() bool

func (RuneCount) IsMutable

func (count RuneCount) IsMutable() bool

func (*RuneCount) PrettyPrint

func (c *RuneCount) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*RuneCount) Static

func (c *RuneCount) Static() Pattern

func (*RuneCount) Test

func (c *RuneCount) Test(v Value, state RecTestCallState) bool

func (*RuneCount) WidestOfType

func (c *RuneCount) WidestOfType() Value

type RuneRange

type RuneRange struct {
	SerializableMixin
	// contains filtered or unexported fields
}

A RuneRange represents a symbolic RuneRange.

func (*RuneRange) Contains

func (r *RuneRange) Contains(value Serializable) (bool, bool)

func (*RuneRange) Element

func (r *RuneRange) Element() Value

func (*RuneRange) ElementAt

func (r *RuneRange) ElementAt(i int) Value

func (*RuneRange) HasKnownLen

func (r *RuneRange) HasKnownLen() bool

func (RuneRange) IsMutable

func (r RuneRange) IsMutable() bool

func (*RuneRange) IteratorElementKey

func (r *RuneRange) IteratorElementKey() Value

func (*RuneRange) IteratorElementValue

func (r *RuneRange) IteratorElementValue() Value

func (*RuneRange) KnownLen

func (r *RuneRange) KnownLen() int

func (*RuneRange) PrettyPrint

func (r *RuneRange) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*RuneRange) Static

func (r *RuneRange) Static() Pattern

func (*RuneRange) Test

func (r *RuneRange) Test(v Value, state RecTestCallState) bool

func (*RuneRange) WidestOfType

func (r *RuneRange) WidestOfType() Value

type RuneSlice

type RuneSlice struct {
	SerializableMixin
	ClonableSerializableMixin
}

func NewRuneSlice

func NewRuneSlice() *RuneSlice

func (*RuneSlice) Concretize

func (s *RuneSlice) Concretize(ctx ConcreteContext) any

func (*RuneSlice) Element

func (s *RuneSlice) Element() Value

func (*RuneSlice) ElementAt

func (*RuneSlice) ElementAt(i int) Value

func (*RuneSlice) HasKnownLen

func (s *RuneSlice) HasKnownLen() bool

func (*RuneSlice) Insert

func (s *RuneSlice) Insert(ctx *Context, v Value, i *Int)

func (*RuneSlice) IsConcretizable

func (s *RuneSlice) IsConcretizable() bool

func (*RuneSlice) IsMutable

func (slice *RuneSlice) IsMutable() bool

func (*RuneSlice) IteratorElementKey

func (s *RuneSlice) IteratorElementKey() Value

func (*RuneSlice) IteratorElementValue

func (s *RuneSlice) IteratorElementValue() Value

func (*RuneSlice) KnownLen

func (s *RuneSlice) KnownLen() int

func (*RuneSlice) PrettyPrint

func (s *RuneSlice) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*RuneSlice) Prop

func (s *RuneSlice) Prop(name string) Value

func (*RuneSlice) PropertyNames

func (s *RuneSlice) PropertyNames() []string

func (*RuneSlice) SetProp

func (s *RuneSlice) SetProp(name string, value Value) (IProps, error)

func (*RuneSlice) SetSlice

func (s *RuneSlice) SetSlice(ctx *Context, start, end *Int, v Sequence)

func (*RuneSlice) TakeInMemorySnapshot

func (s *RuneSlice) TakeInMemorySnapshot() (*Snapshot, error)

func (*RuneSlice) Test

func (s *RuneSlice) Test(v Value, state RecTestCallState) bool

func (*RuneSlice) WatcherElement

func (s *RuneSlice) WatcherElement() Value

func (*RuneSlice) WidestOfType

func (b *RuneSlice) WidestOfType() Value

func (*RuneSlice) WithExistingPropReplaced

func (s *RuneSlice) WithExistingPropReplaced(name string, value Value) (IProps, error)

type Scheme

type Scheme struct {
	SerializableMixin
	// contains filtered or unexported fields
}

A Scheme represents a symbolic Scheme.

func GetOrNewScheme

func GetOrNewScheme(v string) *Scheme

func NewScheme

func NewScheme(v string) *Scheme

func (*Scheme) Concretize

func (s *Scheme) Concretize(ctx ConcreteContext) any

func (*Scheme) IsConcretizable

func (s *Scheme) IsConcretizable() bool

func (Scheme) IsMutable

func (scheme Scheme) IsMutable() bool

func (*Scheme) PrettyPrint

func (s *Scheme) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Scheme) Static

func (s *Scheme) Static() Pattern

func (*Scheme) Test

func (s *Scheme) Test(v Value, state RecTestCallState) bool

func (*Scheme) WidestOfType

func (s *Scheme) WidestOfType() Value

type ScopeData

type ScopeData struct {
	Variables []VarData
}

type Secret

type Secret struct {
	SerializableMixin
	// contains filtered or unexported fields
}

A Secret represents a symbolic Secret.

func NewSecret

func NewSecret(value Value, pattern *SecretPattern) (*Secret, error)

func (*Secret) IsMutable

func (*Secret) IsMutable() bool

func (*Secret) PrettyPrint

func (r *Secret) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Secret) Test

func (r *Secret) Test(v Value, state RecTestCallState) bool

func (*Secret) WidestOfType

func (r *Secret) WidestOfType() Value

type SecretPattern

type SecretPattern struct {
	NotCallablePatternMixin
	SerializableMixin
	// contains filtered or unexported fields
}

func NewSecretPattern

func NewSecretPattern(patt StringPattern) *SecretPattern

NewSecretPattern creates a SecretPattern from the given string pattern

func (*SecretPattern) HasUnderlyingPattern

func (pattern *SecretPattern) HasUnderlyingPattern() bool

func (*SecretPattern) IsMutable

func (*SecretPattern) IsMutable() bool

func (*SecretPattern) IteratorElementKey

func (pattern *SecretPattern) IteratorElementKey() Value

func (*SecretPattern) IteratorElementValue

func (pattern *SecretPattern) IteratorElementValue() Value

func (*SecretPattern) PrettyPrint

func (pattern *SecretPattern) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*SecretPattern) StringPattern

func (pattern *SecretPattern) StringPattern() (StringPattern, bool)

func (*SecretPattern) SymbolicValue

func (pattern *SecretPattern) SymbolicValue() Value

func (*SecretPattern) Test

func (pattern *SecretPattern) Test(v Value, state RecTestCallState) bool

func (*SecretPattern) TestValue

func (pattern *SecretPattern) TestValue(v Value, state RecTestCallState) bool

func (*SecretPattern) WidestOfType

func (pattern *SecretPattern) WidestOfType() Value

type Sequence

type Sequence interface {
	Indexable
	// contains filtered or unexported methods
}

type SequenceStringPattern

type SequenceStringPattern struct {
	SerializableMixin
	NotCallablePatternMixin
	// contains filtered or unexported fields
}

An SequenceStringPattern represents a symbolic SequenceStringPattern

func NewSequenceStringPattern

func NewSequenceStringPattern(node *parse.ComplexStringPatternPiece, chunk *parse.Chunk) *SequenceStringPattern

func (*SequenceStringPattern) HasRegex

func (p *SequenceStringPattern) HasRegex() bool

func (*SequenceStringPattern) HasUnderlyingPattern

func (p *SequenceStringPattern) HasUnderlyingPattern() bool

func (*SequenceStringPattern) IsMutable

func (patt *SequenceStringPattern) IsMutable() bool

func (*SequenceStringPattern) IteratorElementKey

func (p *SequenceStringPattern) IteratorElementKey() Value

func (*SequenceStringPattern) IteratorElementValue

func (p *SequenceStringPattern) IteratorElementValue() Value

func (*SequenceStringPattern) MatchGroups

func (p *SequenceStringPattern) MatchGroups(v Value) (bool, map[string]Value)

func (*SequenceStringPattern) PrettyPrint

func (*SequenceStringPattern) StringPattern

func (p *SequenceStringPattern) StringPattern() (StringPattern, bool)

func (*SequenceStringPattern) SymbolicValue

func (p *SequenceStringPattern) SymbolicValue() Value

func (*SequenceStringPattern) Test

func (*SequenceStringPattern) TestValue

func (p *SequenceStringPattern) TestValue(v Value, state RecTestCallState) bool

func (*SequenceStringPattern) WidestOfType

func (p *SequenceStringPattern) WidestOfType() Value

type Serializable

type Serializable interface {
	Value
	// contains filtered or unexported methods
}

A Serializable represents a symbolic Serializable.

func AsSerializableChecked

func AsSerializableChecked(v Value) Serializable

func GetValueAtURL

func GetValueAtURL(u *URL, state *State) (Serializable, error)

func ValuesToSerializable

func ValuesToSerializable(values []Value) []Serializable

type SerializableIterable

type SerializableIterable interface {
	Iterable
	Serializable
}

type SerializableMixin

type SerializableMixin struct {
}

type Snapshot

type Snapshot struct {
	UnassignablePropsMixin
	// contains filtered or unexported fields
}

An Snapshot represents a symbolic Snapshot.

func (*Snapshot) IsMutable

func (*Snapshot) IsMutable() bool

func (*Snapshot) PrettyPrint

func (m *Snapshot) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Snapshot) Prop

func (m *Snapshot) Prop(name string) Value

func (*Snapshot) PropertyNames

func (m *Snapshot) PropertyNames() []string

func (*Snapshot) ReceiveSnapshot

func (m *Snapshot) ReceiveSnapshot(Value) error

func (*Snapshot) Test

func (m *Snapshot) Test(v Value, state RecTestCallState) bool

func (*Snapshot) WidestOfType

func (m *Snapshot) WidestOfType() Value

type State

type State struct {
	Module *Module
	// contains filtered or unexported fields
}

State is the state of a symbolic evaluation. TODO: reduce memory usage of scopes

func MakeTestStateAndChunk

func MakeTestStateAndChunk(code string, globals ...map[string]Value) (*parse.Chunk, *State)

func MakeTestStateAndChunks

func MakeTestStateAndChunks(code string, includedFiles map[string]string, globals ...map[string]Value) (*parse.Chunk, *State)

func MakeTestStateAndImportedModules

func MakeTestStateAndImportedModules(code string, files map[string]string, globals ...map[string]Value) (*parse.Chunk, *State)

func (*State) Errors

func (state *State) Errors() []SymbolicEvaluationError

func (*State) Warnings

func (state *State) Warnings() []SymbolicEvaluationWarning

type StaticCheckData

type StaticCheckData struct {
	// contains filtered or unexported fields
}

A StaticCheckData represents a symbolic StaticCheckData.

func (*StaticCheckData) Compute

func (d *StaticCheckData) Compute(ctx *Context, key Value) Value

func (*StaticCheckData) GetGoMethod

func (d *StaticCheckData) GetGoMethod(name string) (*GoFunction, bool)

func (*StaticCheckData) IsMutable

func (d *StaticCheckData) IsMutable() bool

func (*StaticCheckData) PrettyPrint

func (*StaticCheckData) Prop

func (d *StaticCheckData) Prop(name string) Value

func (*StaticCheckData) PropertyNames

func (*StaticCheckData) PropertyNames() []string

func (*StaticCheckData) SetProp

func (d *StaticCheckData) SetProp(name string, value Value) (IProps, error)

func (*StaticCheckData) Test

func (d *StaticCheckData) Test(v Value, state RecTestCallState) bool

func (*StaticCheckData) WidestOfType

func (m *StaticCheckData) WidestOfType() Value

func (*StaticCheckData) WithExistingPropReplaced

func (d *StaticCheckData) WithExistingPropReplaced(name string, value Value) (IProps, error)

type StaticDataHolder

type StaticDataHolder interface {
	Value

	//AddStatic returns a new StaticDataHolder with the added static data.
	AddStatic(Pattern) (StaticDataHolder, error)
}

type StreamSink

type StreamSink interface {
	Value
	WritableStreamElement() Value
	ChunkedWritableStreamElement() Value
}

An StreamSink represents a symbolic StreamSink.

type StreamSource

type StreamSource interface {
	Value
	StreamElement() Value
	ChunkedStreamElement() Value
}

An StreamSource represents a symbolic StreamSource.

type String

type String struct {
	UnassignablePropsMixin
	SerializableMixin
	ComparableMixin
	// contains filtered or unexported fields
}

A String represents a symbolic Str.

func NewString

func NewString(v string) *String

func NewStringMatchingPattern

func NewStringMatchingPattern(p StringPattern) *String

func NewStringWithLengthRange

func NewStringWithLengthRange(minLength, maxLength int64) *String

func (*String) Concretize

func (s *String) Concretize(ctx ConcreteContext) any

func (*String) Element

func (s *String) Element() Value

func (*String) ElementAt

func (*String) ElementAt(i int) Value

func (*String) GetOrBuildString

func (s *String) GetOrBuildString() *String

func (*String) HasKnownLen

func (s *String) HasKnownLen() bool

func (*String) HasValue

func (s *String) HasValue() bool

func (*String) IsConcretizable

func (s *String) IsConcretizable() bool

func (String) IsMutable

func (s String) IsMutable() bool

func (*String) IteratorElementKey

func (s *String) IteratorElementKey() Value

func (*String) IteratorElementValue

func (s *String) IteratorElementValue() Value

func (*String) KnownLen

func (s *String) KnownLen() int

func (*String) PrettyPrint

func (s *String) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*String) Prop

func (s *String) Prop(name string) Value

func (*String) PropertyNames

func (p *String) PropertyNames() []string

func (*String) Reader

func (s *String) Reader() *Reader

func (*String) Static

func (s *String) Static() Pattern

func (*String) Test

func (s *String) Test(v Value, state RecTestCallState) bool

func (*String) Value

func (s *String) Value() string

func (*String) WidestOfType

func (f *String) WidestOfType() Value

type StringConcatenation

type StringConcatenation struct {
	UnassignablePropsMixin
	SerializableMixin
}

A StringConcatenation represents a symbolic StringConcatenation.

func (*StringConcatenation) Concretize

func (c *StringConcatenation) Concretize(ctx ConcreteContext) any

func (*StringConcatenation) Element

func (c *StringConcatenation) Element() Value

func (*StringConcatenation) ElementAt

func (c *StringConcatenation) ElementAt(i int) Value

func (*StringConcatenation) GetOrBuildString

func (c *StringConcatenation) GetOrBuildString() *String

func (*StringConcatenation) HasKnownLen

func (c *StringConcatenation) HasKnownLen() bool

func (*StringConcatenation) IsConcretizable

func (c *StringConcatenation) IsConcretizable() bool

func (*StringConcatenation) IsMutable

func (c *StringConcatenation) IsMutable() bool

func (*StringConcatenation) IteratorElementKey

func (c *StringConcatenation) IteratorElementKey() Value

func (*StringConcatenation) IteratorElementValue

func (c *StringConcatenation) IteratorElementValue() Value

func (*StringConcatenation) KnownLen

func (c *StringConcatenation) KnownLen() int

func (*StringConcatenation) PrettyPrint

func (*StringConcatenation) Prop

func (c *StringConcatenation) Prop(name string) Value

func (*StringConcatenation) PropertyNames

func (c *StringConcatenation) PropertyNames() []string

func (*StringConcatenation) Reader

func (c *StringConcatenation) Reader() *Reader

func (*StringConcatenation) Test

func (c *StringConcatenation) Test(v Value, state RecTestCallState) bool

func (*StringConcatenation) WidestOfType

func (c *StringConcatenation) WidestOfType() Value

type StringLike

type StringLike interface {
	Serializable
	Sequence
	PseudoPropsValue
	GetOrBuildString() *String
}

A StringLike represents a symbolic StringLike.

type StringPattern

type StringPattern interface {
	Pattern
	HasRegex() bool
}

A StringPattern represents a symbolic StringPattern.

type StringType

type StringType struct {
	// contains filtered or unexported fields
}

func (*StringType) Equal

func (t *StringType) Equal(v CompileTimeType, state RecTestCallState) bool

func (*StringType) PrettyPrint

func (t *StringType) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*StringType) SymbolicValue

func (t *StringType) SymbolicValue() Value

func (*StringType) TestValue

func (t *StringType) TestValue(v Value, state RecTestCallState) bool

type Struct

type Struct struct {
	// contains filtered or unexported fields
}

A Struct represents a symbolic Struct.

func (*Struct) IsMutable

func (*Struct) IsMutable() bool

func (*Struct) PrettyPrint

func (s *Struct) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Struct) Test

func (s *Struct) Test(v Value, state RecTestCallState) bool

func (*Struct) WidestOfType

func (s *Struct) WidestOfType() Value

type StructField

type StructField struct {
	Name string
	Type CompileTimeType
}

type StructMethod

type StructMethod struct {
	Name  string
	Value *InoxFunction
}

type StructType

type StructType struct {
	// contains filtered or unexported fields
}

StructType represents a struct type, it implements CompileTimeType.

func NewStructType

func NewStructType(name string, fields []StructField, methods []StructMethod) *StructType

func (*StructType) Equal

func (t *StructType) Equal(v CompileTimeType, state RecTestCallState) bool

func (*StructType) Field

func (t *StructType) Field(index int) StructField

Field returns the field at index in the definition order.

func (*StructType) FieldByName

func (t *StructType) FieldByName(name string) (StructField, bool)

func (*StructType) FieldCount

func (t *StructType) FieldCount() int

func (*StructType) Fields

func (t *StructType) Fields() []StructField

Fields returns the underyling field slice, in definition order. The slice should NOT be modified.

func (*StructType) Method

func (t *StructType) Method(index int) StructMethod

func (*StructType) MethodCount

func (t *StructType) MethodCount() int

func (*StructType) Name

func (t *StructType) Name() (string, bool)

func (*StructType) PrettyPrint

func (t *StructType) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*StructType) SymbolicValue

func (t *StructType) SymbolicValue() Value

func (*StructType) TestValue

func (t *StructType) TestValue(v Value, state RecTestCallState) bool

type Subscriber

type Subscriber interface {
	Value
	ReceivePublication(*Publication) error
}

An Subscriber represents a symbolic Subscriber.

type Subscription

type Subscription struct {
	// contains filtered or unexported fields
}

An Subscription represents a symbolic Subscription.

func NewSubscription

func NewSubscription() *Subscription

add parameters

func (*Subscription) IsMutable

func (*Subscription) IsMutable() bool

func (*Subscription) PrettyPrint

func (r *Subscription) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Subscription) Test

func (r *Subscription) Test(v Value, state RecTestCallState) bool

func (*Subscription) WidestOfType

func (r *Subscription) WidestOfType() Value

type SymbolicEvaluationError

type SymbolicEvaluationError struct {
	Message        string
	LocatedMessage string
	Location       parse.SourcePositionStack
}

func (SymbolicEvaluationError) Error

func (err SymbolicEvaluationError) Error() string

func (SymbolicEvaluationError) LocationStack

func (SymbolicEvaluationError) MessageWithoutLocation

func (err SymbolicEvaluationError) MessageWithoutLocation() string

type SymbolicEvaluationWarning

type SymbolicEvaluationWarning struct {
	Message        string
	LocatedMessage string
	Location       parse.SourcePositionStack
}

type SynchronousMessageHandler

type SynchronousMessageHandler struct {
	UnassignablePropsMixin
	SerializableMixin
}

A SynchronousMessageHandler represents a symbolic SynchronousMessageHandler.

func NewMessageHandler

func NewMessageHandler() *SynchronousMessageHandler

func (*SynchronousMessageHandler) IsMutable

func (*SynchronousMessageHandler) IsMutable() bool

func (*SynchronousMessageHandler) PrettyPrint

func (*SynchronousMessageHandler) Prop

func (l *SynchronousMessageHandler) Prop(name string) Value

func (*SynchronousMessageHandler) PropertyNames

func (m *SynchronousMessageHandler) PropertyNames() []string

func (*SynchronousMessageHandler) ReceiveMessage

func (l *SynchronousMessageHandler) ReceiveMessage(Value) error

func (*SynchronousMessageHandler) Test

func (*SynchronousMessageHandler) WatcherElement

func (m *SynchronousMessageHandler) WatcherElement() Value

func (*SynchronousMessageHandler) WidestOfType

func (l *SynchronousMessageHandler) WidestOfType() Value

type SystemGraph

type SystemGraph struct {
	SerializableMixin
	// contains filtered or unexported fields
}

An SystemGraph represents a symbolic SystemGraph.

func NewSystemGraph

func NewSystemGraph() *SystemGraph

func (*SystemGraph) IsMutable

func (*SystemGraph) IsMutable() bool

func (*SystemGraph) IsSharable

func (g *SystemGraph) IsSharable() (bool, string)

func (*SystemGraph) IsShared

func (g *SystemGraph) IsShared() bool

func (*SystemGraph) PrettyPrint

func (g *SystemGraph) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*SystemGraph) Prop

func (g *SystemGraph) Prop(memberName string) Value

func (*SystemGraph) PropertyNames

func (g *SystemGraph) PropertyNames() []string

func (*SystemGraph) SetProp

func (g *SystemGraph) SetProp(name string, value Value) (IProps, error)

func (*SystemGraph) Share

func (g *SystemGraph) Share(originState *State) PotentiallySharable

func (*SystemGraph) TakeInMemorySnapshot

func (g *SystemGraph) TakeInMemorySnapshot() (*Snapshot, error)

func (*SystemGraph) Test

func (g *SystemGraph) Test(v Value, state RecTestCallState) bool

func (*SystemGraph) WatcherElement

func (g *SystemGraph) WatcherElement() Value

func (*SystemGraph) WidestOfType

func (g *SystemGraph) WidestOfType() Value

func (*SystemGraph) WithExistingPropReplaced

func (g *SystemGraph) WithExistingPropReplaced(name string, value Value) (IProps, error)

type SystemGraphEdge

type SystemGraphEdge struct {
	SerializableMixin
	// contains filtered or unexported fields
}

A SystemGraphEdge represents a symbolic SystemGraphEdge.

func NewSystemGraphEdge

func NewSystemGraphEdge() *SystemGraphEdge

func (*SystemGraphEdge) IsMutable

func (*SystemGraphEdge) IsMutable() bool

func (*SystemGraphEdge) PrettyPrint

func (*SystemGraphEdge) Prop

func (e *SystemGraphEdge) Prop(memberName string) Value

func (*SystemGraphEdge) PropertyNames

func (e *SystemGraphEdge) PropertyNames() []string

func (*SystemGraphEdge) SetProp

func (e *SystemGraphEdge) SetProp(name string, value Value) (IProps, error)

func (*SystemGraphEdge) Test

func (e *SystemGraphEdge) Test(v Value, state RecTestCallState) bool

func (*SystemGraphEdge) WidestOfType

func (e *SystemGraphEdge) WidestOfType() Value

func (*SystemGraphEdge) WithExistingPropReplaced

func (e *SystemGraphEdge) WithExistingPropReplaced(name string, value Value) (IProps, error)

type SystemGraphEvent

type SystemGraphEvent struct {
	SerializableMixin
	// contains filtered or unexported fields
}

An SystemGraphEvent represents a symbolic SystemGraphEvent.

func NewSystemGraphEvent

func NewSystemGraphEvent() *SystemGraphEvent

func (*SystemGraphEvent) IsMutable

func (*SystemGraphEvent) IsMutable() bool

func (*SystemGraphEvent) IsSharable

func (n *SystemGraphEvent) IsSharable() (bool, string)

func (*SystemGraphEvent) IsShared

func (n *SystemGraphEvent) IsShared() bool

func (*SystemGraphEvent) PrettyPrint

func (*SystemGraphEvent) Prop

func (n *SystemGraphEvent) Prop(memberName string) Value

func (*SystemGraphEvent) PropertyNames

func (n *SystemGraphEvent) PropertyNames() []string

func (*SystemGraphEvent) SetProp

func (n *SystemGraphEvent) SetProp(name string, value Value) (IProps, error)

func (*SystemGraphEvent) Share

func (n *SystemGraphEvent) Share(originState *State) PotentiallySharable

func (*SystemGraphEvent) Test

func (n *SystemGraphEvent) Test(v Value, state RecTestCallState) bool

func (*SystemGraphEvent) WidestOfType

func (n *SystemGraphEvent) WidestOfType() Value

func (*SystemGraphEvent) WithExistingPropReplaced

func (n *SystemGraphEvent) WithExistingPropReplaced(name string, value Value) (IProps, error)

type SystemGraphNode

type SystemGraphNode struct {
	// contains filtered or unexported fields
}

An SystemGraphNode represents a symbolic SystemGraphNode.

func NewSystemGraphNode

func NewSystemGraphNode() *SystemGraphNode

func (*SystemGraphNode) IsMutable

func (*SystemGraphNode) IsMutable() bool

func (*SystemGraphNode) IsSharable

func (n *SystemGraphNode) IsSharable() (bool, string)

func (*SystemGraphNode) IsShared

func (n *SystemGraphNode) IsShared() bool

func (*SystemGraphNode) PrettyPrint

func (*SystemGraphNode) Prop

func (n *SystemGraphNode) Prop(memberName string) Value

func (*SystemGraphNode) PropertyNames

func (n *SystemGraphNode) PropertyNames() []string

func (*SystemGraphNode) SetProp

func (n *SystemGraphNode) SetProp(name string, value Value) (IProps, error)

func (*SystemGraphNode) Share

func (n *SystemGraphNode) Share(originState *State) PotentiallySharable

func (*SystemGraphNode) Test

func (n *SystemGraphNode) Test(v Value, state RecTestCallState) bool

func (*SystemGraphNode) WidestOfType

func (n *SystemGraphNode) WidestOfType() Value

func (*SystemGraphNode) WithExistingPropReplaced

func (n *SystemGraphNode) WithExistingPropReplaced(name string, value Value) (IProps, error)

type SystemGraphNodes

type SystemGraphNodes struct {
	// contains filtered or unexported fields
}

An SystemGraphNodes represents a symbolic SystemGraphNodes.

func NewSystemGraphNodes

func NewSystemGraphNodes() *SystemGraphNodes

func (*SystemGraphNodes) IsMutable

func (*SystemGraphNodes) IsMutable() bool

func (*SystemGraphNodes) IsSharable

func (n *SystemGraphNodes) IsSharable() (bool, string)

func (*SystemGraphNodes) IsShared

func (n *SystemGraphNodes) IsShared() bool

func (*SystemGraphNodes) IteratorElementKey

func (d *SystemGraphNodes) IteratorElementKey() Value

func (*SystemGraphNodes) IteratorElementValue

func (d *SystemGraphNodes) IteratorElementValue() Value

func (*SystemGraphNodes) PrettyPrint

func (*SystemGraphNodes) Share

func (n *SystemGraphNodes) Share(originState *State) PotentiallySharable

func (*SystemGraphNodes) Test

func (g *SystemGraphNodes) Test(v Value, state RecTestCallState) bool

func (*SystemGraphNodes) WidestOfType

func (d *SystemGraphNodes) WidestOfType() Value

type TestCase

type TestCase struct {
	UnassignablePropsMixin
	// contains filtered or unexported fields
}

A TestCase represents a symbolic TestCase.

func (*TestCase) GetGoMethod

func (s *TestCase) GetGoMethod(name string) (*GoFunction, bool)

func (*TestCase) IsMutable

func (c *TestCase) IsMutable() bool

func (*TestCase) PrettyPrint

func (s *TestCase) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*TestCase) Prop

func (s *TestCase) Prop(name string) Value

func (*TestCase) PropertyNames

func (*TestCase) PropertyNames() []string

func (*TestCase) Test

func (s *TestCase) Test(v Value, state RecTestCallState) bool

func (*TestCase) WidestOfType

func (s *TestCase) WidestOfType() Value

type TestSuite

type TestSuite struct {
	UnassignablePropsMixin
	// contains filtered or unexported fields
}

A TestSuite represents a symbolic TestSuite.

func (*TestSuite) GetGoMethod

func (s *TestSuite) GetGoMethod(name string) (*GoFunction, bool)

func (*TestSuite) IsMutable

func (s *TestSuite) IsMutable() bool

func (*TestSuite) PrettyPrint

func (s *TestSuite) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*TestSuite) Prop

func (s *TestSuite) Prop(name string) Value

func (*TestSuite) PropertyNames

func (*TestSuite) PropertyNames() []string

func (*TestSuite) Run

func (s *TestSuite) Run(ctx *Context, options ...*Option) (*LThread, *Error)

func (*TestSuite) Test

func (s *TestSuite) Test(v Value, state RecTestCallState) bool

func (*TestSuite) WidestOfType

func (s *TestSuite) WidestOfType() Value

type TestedProgram

type TestedProgram struct {
	UnassignablePropsMixin
	// contains filtered or unexported fields
}

A TestedProgram represents a symbolic TestedProgram.

func (*TestedProgram) Cancel

func (t *TestedProgram) Cancel(*Context)

func (*TestedProgram) GetGoMethod

func (t *TestedProgram) GetGoMethod(name string) (*GoFunction, bool)

func (*TestedProgram) IsMutable

func (*TestedProgram) IsMutable() bool

func (*TestedProgram) PrettyPrint

func (t *TestedProgram) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*TestedProgram) Prop

func (t *TestedProgram) Prop(name string) Value

func (*TestedProgram) PropertyNames

func (*TestedProgram) PropertyNames() []string

func (*TestedProgram) Test

func (t *TestedProgram) Test(v Value, state RecTestCallState) bool

func (*TestedProgram) WidestOfType

func (t *TestedProgram) WidestOfType() Value

type Token

type Token struct {
	UnassignablePropsMixin
	// contains filtered or unexported fields
}

An Token represents a symbolic Token.

func (Token) IsMutable

func (t Token) IsMutable() bool

func (*Token) PrettyPrint

func (t *Token) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Token) Prop

func (r *Token) Prop(name string) Value

func (*Token) PropertyNames

func (*Token) PropertyNames() []string

func (*Token) Test

func (n *Token) Test(v Value, state RecTestCallState) bool

func (*Token) WidestOfType

func (t *Token) WidestOfType() Value

type Transaction

type Transaction struct {
	UnassignablePropsMixin
	// contains filtered or unexported fields
}

A Transaction represents a symbolic Transaction.

func (*Transaction) Commit

func (tx *Transaction) Commit(ctx *Context) *Error

func (*Transaction) GetGoMethod

func (tx *Transaction) GetGoMethod(name string) (*GoFunction, bool)

func (*Transaction) IsMutable

func (tx *Transaction) IsMutable() bool

func (*Transaction) PrettyPrint

func (tx *Transaction) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Transaction) Prop

func (tx *Transaction) Prop(name string) Value

func (*Transaction) PropertyNames

func (tx *Transaction) PropertyNames() []string

func (*Transaction) Rollback

func (tx *Transaction) Rollback(ctx *Context) *Error

func (*Transaction) Start

func (tx *Transaction) Start(ctx *Context) *Error

func (*Transaction) Test

func (tx *Transaction) Test(v Value, state RecTestCallState) bool

func (*Transaction) WidestOfType

func (tx *Transaction) WidestOfType() Value

type Treedata

type Treedata struct {
	SerializableMixin
	// contains filtered or unexported fields
}

A Treedata represents a symbolic Treedata.

func (*Treedata) IsMutable

func (u *Treedata) IsMutable() bool

func (*Treedata) PrettyPrint

func (i *Treedata) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Treedata) Test

func (i *Treedata) Test(v Value, state RecTestCallState) bool

func (*Treedata) WalkerElement

func (*Treedata) WalkerElement() Value

func (*Treedata) WalkerNodeMeta

func (*Treedata) WalkerNodeMeta() Value

func (*Treedata) WidestOfType

func (i *Treedata) WidestOfType() Value

type TreedataHiearchyEntry

type TreedataHiearchyEntry struct {
	// contains filtered or unexported fields
}

A TreedataHiearchyEntry represents a symbolic Treedata.

func (TreedataHiearchyEntry) IsMutable

func (e TreedataHiearchyEntry) IsMutable() bool

func (*TreedataHiearchyEntry) PrettyPrint

func (*TreedataHiearchyEntry) Test

func (*TreedataHiearchyEntry) WidestOfType

func (i *TreedataHiearchyEntry) WidestOfType() Value

type Tuple

type Tuple struct {
	SerializableMixin
	// contains filtered or unexported fields
}

A Tuple represents a symbolic Tuple.

func NewTuple

func NewTuple(elements ...Serializable) *Tuple

func NewTupleOf

func NewTupleOf(generalElement Serializable) *Tuple

func (*Tuple) Concretize

func (t *Tuple) Concretize(ctx ConcreteContext) any

func (*Tuple) Contains

func (t *Tuple) Contains(value Serializable) (bool, bool)

func (*Tuple) Element

func (t *Tuple) Element() Value

func (*Tuple) ElementAt

func (t *Tuple) ElementAt(i int) Value

func (*Tuple) HasKnownLen

func (t *Tuple) HasKnownLen() bool

func (*Tuple) IsConcretizable

func (t *Tuple) IsConcretizable() bool

func (*Tuple) IsMutable

func (tuple *Tuple) IsMutable() bool

func (*Tuple) IteratorElementKey

func (t *Tuple) IteratorElementKey() Value

func (*Tuple) IteratorElementValue

func (t *Tuple) IteratorElementValue() Value

func (*Tuple) KnownLen

func (t *Tuple) KnownLen() int

func (*Tuple) PrettyPrint

func (t *Tuple) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Tuple) Static

func (t *Tuple) Static() Pattern

func (*Tuple) Test

func (t *Tuple) Test(v Value, state RecTestCallState) bool

func (*Tuple) WidestOfType

func (t *Tuple) WidestOfType() Value

type TuplePattern

type TuplePattern struct {
	NotCallablePatternMixin
	SerializableMixin
	// contains filtered or unexported fields
}

A TuplePattern represents a symbolic TuplePattern. .elements and .generalElement can never be both nil (nor both not nil).

func NewTuplePattern

func NewTuplePattern(elements []Pattern) *TuplePattern

func NewTuplePatternOf

func NewTuplePatternOf(generalElement Pattern) *TuplePattern

func (*TuplePattern) Concretize

func (p *TuplePattern) Concretize(ctx ConcreteContext) any

func (*TuplePattern) HasUnderlyingPattern

func (p *TuplePattern) HasUnderlyingPattern() bool

func (*TuplePattern) IsConcretizable

func (p *TuplePattern) IsConcretizable() bool

func (*TuplePattern) IsMutable

func (patt *TuplePattern) IsMutable() bool

func (*TuplePattern) IteratorElementKey

func (p *TuplePattern) IteratorElementKey() Value

func (*TuplePattern) IteratorElementValue

func (p *TuplePattern) IteratorElementValue() Value

func (*TuplePattern) MigrationInitialValue

func (p *TuplePattern) MigrationInitialValue() (Serializable, bool)

func (*TuplePattern) PrettyPrint

func (p *TuplePattern) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*TuplePattern) StringPattern

func (p *TuplePattern) StringPattern() (StringPattern, bool)

func (*TuplePattern) SymbolicValue

func (p *TuplePattern) SymbolicValue() Value

func (*TuplePattern) Test

func (p *TuplePattern) Test(v Value, state RecTestCallState) bool

func (*TuplePattern) TestValue

func (p *TuplePattern) TestValue(v Value, state RecTestCallState) bool

func (*TuplePattern) WidestOfType

func (p *TuplePattern) WidestOfType() Value

type Type

type Type struct {
	Type reflect.Type //if nil, any type is matched
}

A Type represents a symbolic Type.

func (Type) IsMutable

func (t Type) IsMutable() bool

func (*Type) PrettyPrint

func (t *Type) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Type) Test

func (t *Type) Test(v Value, state RecTestCallState) bool

func (*Type) WidestOfType

func (t *Type) WidestOfType() Value

type TypeExtension

type TypeExtension struct {
	//formatted location of the extend statement that defines the extension.
	//TODO: maje sure it's a truly unique id
	Id        string
	Statement *parse.ExtendStatement

	ExtendedPattern Pattern

	PropertyExpressions []propertyExpression
}

type TypePattern

type TypePattern struct {
	SerializableMixin
	// contains filtered or unexported fields
}

func NewTypePattern

func NewTypePattern(
	value Value, call func(ctx *Context, values []Value) (Pattern, error),
	stringPattern func() (StringPattern, bool), concrete any,
) *TypePattern

func (*TypePattern) Call

func (p *TypePattern) Call(ctx *Context, values []Value) (Pattern, error)

func (*TypePattern) Concretize

func (patt *TypePattern) Concretize(ctx ConcreteContext) any

func (*TypePattern) HasUnderlyingPattern

func (p *TypePattern) HasUnderlyingPattern() bool

func (*TypePattern) IsConcretizable

func (patt *TypePattern) IsConcretizable() bool

func (*TypePattern) IsMutable

func (pattern *TypePattern) IsMutable() bool

func (*TypePattern) IteratorElementKey

func (p *TypePattern) IteratorElementKey() Value

func (*TypePattern) IteratorElementValue

func (p *TypePattern) IteratorElementValue() Value

func (*TypePattern) MigrationInitialValue

func (p *TypePattern) MigrationInitialValue() (Serializable, bool)

func (*TypePattern) PrettyPrint

func (p *TypePattern) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*TypePattern) StringPattern

func (p *TypePattern) StringPattern() (StringPattern, bool)

func (*TypePattern) SymbolicValue

func (p *TypePattern) SymbolicValue() Value

func (*TypePattern) Test

func (p *TypePattern) Test(v Value, state RecTestCallState) bool

func (*TypePattern) TestValue

func (p *TypePattern) TestValue(v Value, state RecTestCallState) bool

func (*TypePattern) WidestOfType

func (p *TypePattern) WidestOfType() Value

type ULID

type ULID struct {
	SerializableMixin
	ComparableMixin
	// contains filtered or unexported fields
}

An ULID represents a symbolic ULID.

func NewULID

func NewULID(v ulid.ULID) *ULID

func (*ULID) Concretize

func (i *ULID) Concretize(ctx ConcreteContext) any

func (*ULID) HasValue

func (i *ULID) HasValue() bool

func (*ULID) IsConcretizable

func (i *ULID) IsConcretizable() bool

func (*ULID) IsMutable

func (*ULID) IsMutable() bool

func (*ULID) PrettyPrint

func (i *ULID) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*ULID) Static

func (i *ULID) Static() Pattern

func (*ULID) Test

func (i *ULID) Test(v Value, state RecTestCallState) bool

func (*ULID) Value

func (i *ULID) Value() ulid.ULID

func (*ULID) WidestOfType

func (i *ULID) WidestOfType() Value

type URL

type URL struct {
	UnassignablePropsMixin
	SerializableMixin
	// contains filtered or unexported fields
}

A URL represents a symbolic URL.

func NewUrl

func NewUrl(v string) *URL

func NewUrlMatchingPattern

func NewUrlMatchingPattern(p *URLPattern) *URL

func (*URL) Concretize

func (u *URL) Concretize(ctx ConcreteContext) any

func (*URL) IsConcretizable

func (u *URL) IsConcretizable() bool

func (URL) IsMutable

func (u URL) IsMutable() bool

func (*URL) PrettyPrint

func (u *URL) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*URL) Prop

func (u *URL) Prop(name string) Value

func (*URL) PropertyNames

func (u *URL) PropertyNames() []string

func (*URL) ResourceName

func (u *URL) ResourceName() *String

func (*URL) Static

func (u *URL) Static() Pattern

func (*URL) Test

func (u *URL) Test(v Value, state RecTestCallState) bool

func (*URL) WidestOfType

func (u *URL) WidestOfType() Value

func (*URL) WithAdditionalPathPatternSegment

func (u *URL) WithAdditionalPathPatternSegment(segment string) *URL

func (*URL) WithAdditionalPathSegment

func (u *URL) WithAdditionalPathSegment(segment string) *URL

type URLPattern

type URLPattern struct {
	NotCallablePatternMixin
	UnassignablePropsMixin
	SerializableMixin
	// contains filtered or unexported fields
}

A URLPattern represents a symbolic URLPattern.

func NewUrlPattern

func NewUrlPattern(v string) *URLPattern

func NewUrlPatternFromNode

func NewUrlPatternFromNode(n parse.Node, chunk *parse.Chunk) *URLPattern

func (*URLPattern) Concretize

func (p *URLPattern) Concretize(ctx ConcreteContext) any

func (*URLPattern) HasUnderlyingPattern

func (p *URLPattern) HasUnderlyingPattern() bool

func (*URLPattern) IsConcretizable

func (p *URLPattern) IsConcretizable() bool

func (URLPattern) IsMutable

func (patt URLPattern) IsMutable() bool

func (*URLPattern) IteratorElementKey

func (p *URLPattern) IteratorElementKey() Value

func (*URLPattern) IteratorElementValue

func (p *URLPattern) IteratorElementValue() Value

func (*URLPattern) PrettyPrint

func (p *URLPattern) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*URLPattern) Prop

func (*URLPattern) Prop(name string) Value

func (*URLPattern) PropertyNames

func (p *URLPattern) PropertyNames() []string

func (*URLPattern) Static

func (p *URLPattern) Static() Pattern

func (*URLPattern) StringPattern

func (p *URLPattern) StringPattern() (StringPattern, bool)

func (*URLPattern) SymbolicValue

func (p *URLPattern) SymbolicValue() Value

func (*URLPattern) Test

func (p *URLPattern) Test(v Value, state RecTestCallState) bool

func (*URLPattern) TestValue

func (p *URLPattern) TestValue(v Value, state RecTestCallState) bool

func (*URLPattern) WidestOfType

func (p *URLPattern) WidestOfType() Value

func (*URLPattern) WithAdditionalPathSegment

func (p *URLPattern) WithAdditionalPathSegment(segment string) *URLPattern

type UUIDv4

type UUIDv4 struct {
	SerializableMixin
	// contains filtered or unexported fields
}

An UUIDv4 represents a symbolic UUIDv4.

func NewUUID

func NewUUID(v uuid.UUID) *UUIDv4

func (*UUIDv4) Concretize

func (i *UUIDv4) Concretize(ctx ConcreteContext) any

func (*UUIDv4) HasValue

func (i *UUIDv4) HasValue() bool

func (*UUIDv4) IsConcretizable

func (i *UUIDv4) IsConcretizable() bool

func (*UUIDv4) IsMutable

func (*UUIDv4) IsMutable() bool

func (*UUIDv4) PrettyPrint

func (i *UUIDv4) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*UUIDv4) Static

func (i *UUIDv4) Static() Pattern

func (*UUIDv4) Test

func (i *UUIDv4) Test(v Value, state RecTestCallState) bool

func (*UUIDv4) Value

func (i *UUIDv4) Value() uuid.UUID

func (*UUIDv4) WidestOfType

func (i *UUIDv4) WidestOfType() Value

type UnassignablePropsMixin

type UnassignablePropsMixin struct {
}

func (UnassignablePropsMixin) SetProp

func (UnassignablePropsMixin) SetProp(name string, value Value) (IProps, error)

func (UnassignablePropsMixin) WithExistingPropReplaced

func (UnassignablePropsMixin) WithExistingPropReplaced(name string, value Value) (IProps, error)

type UnionPattern

type UnionPattern struct {
	NotCallablePatternMixin
	SerializableMixin
	// contains filtered or unexported fields
}

A UnionPattern represents a symbolic UnionPattern.

func NewDisjointStringUnionPattern

func NewDisjointStringUnionPattern(cases ...string) (*UnionPattern, error)

func NewUnionPattern

func NewUnionPattern(cases []Pattern, disjoint bool) (*UnionPattern, error)

func (*UnionPattern) Cases

func (p *UnionPattern) Cases() []Pattern

func (*UnionPattern) HasUnderlyingPattern

func (p *UnionPattern) HasUnderlyingPattern() bool

func (*UnionPattern) IsMutable

func (patt *UnionPattern) IsMutable() bool

func (*UnionPattern) IteratorElementKey

func (p *UnionPattern) IteratorElementKey() Value

func (*UnionPattern) IteratorElementValue

func (p *UnionPattern) IteratorElementValue() Value

func (*UnionPattern) PrettyPrint

func (p *UnionPattern) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*UnionPattern) StringPattern

func (p *UnionPattern) StringPattern() (StringPattern, bool)

func (*UnionPattern) SymbolicValue

func (p *UnionPattern) SymbolicValue() Value

func (*UnionPattern) Test

func (p *UnionPattern) Test(v Value, state RecTestCallState) bool

func (*UnionPattern) TestValue

func (p *UnionPattern) TestValue(v Value, state RecTestCallState) bool

func (*UnionPattern) WidestOfType

func (p *UnionPattern) WidestOfType() Value

type UrlHolder

type UrlHolder interface {
	Serializable
	WithURL(url *URL) UrlHolder
	URL() (*URL, bool)
}

type Value

type Value interface {
	Test(v Value, state RecTestCallState) bool

	IsMutable() bool

	WidestOfType() Value

	PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)
}

A Value represents a Value during symbolic evaluation, its underlying data should be immutable.

func AsIprops

func AsIprops(v Value) Value

func AsSerializable

func AsSerializable(v Value) Value

func AsStringLike

func AsStringLike(v Value) Value

func GetGoMethodOrPanic

func GetGoMethodOrPanic(name string, v GoValue) Value

func MergeValuesWithSameStaticTypeInMultivalue

func MergeValuesWithSameStaticTypeInMultivalue(v Value) Value

(0 | 1) -> int (0 | 1 | true) -> int|true

func SerializablesToValues

func SerializablesToValues(serializables []Serializable) []Value

func ShareOrClone

func ShareOrClone(v Value, originState *State) (Value, error)

func SymbolicEval

func SymbolicEval(node parse.Node, state *State) (result Value, finalErr error)

type ValueHistory

type ValueHistory struct {
	UnassignablePropsMixin
	// contains filtered or unexported fields
}

A ValueHistory represents a symbolic ValueHistory.

func NewValueHistory

func NewValueHistory() *ValueHistory

func (*ValueHistory) ForgetLast

func (h *ValueHistory) ForgetLast(ctx *Context)

func (*ValueHistory) GetGoMethod

func (h *ValueHistory) GetGoMethod(name string) (*GoFunction, bool)

func (*ValueHistory) IsMutable

func (*ValueHistory) IsMutable() bool

func (*ValueHistory) IsSharable

func (h *ValueHistory) IsSharable() (bool, string)

func (*ValueHistory) IsShared

func (h *ValueHistory) IsShared() bool

func (*ValueHistory) PrettyPrint

func (h *ValueHistory) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*ValueHistory) Prop

func (h *ValueHistory) Prop(name string) Value

func (*ValueHistory) PropertyNames

func (*ValueHistory) PropertyNames() []string

func (*ValueHistory) SetProp

func (h *ValueHistory) SetProp(name string, value Value) (IProps, error)

func (*ValueHistory) Share

func (h *ValueHistory) Share(originState *State) PotentiallySharable

func (*ValueHistory) Test

func (h *ValueHistory) Test(v Value, state RecTestCallState) bool

func (*ValueHistory) ValueAt

func (h *ValueHistory) ValueAt(ctx *Context, d *DateTime) Value

func (*ValueHistory) WidestOfType

func (h *ValueHistory) WidestOfType() Value

func (*ValueHistory) WithExistingPropReplaced

func (h *ValueHistory) WithExistingPropReplaced(name string, value Value) (IProps, error)

type ValuePath

type ValuePath interface {
	Value
	// GetFrom should return (Value, true, nil) if the value can be retrieved from v and is necessarily present.
	// GetFrom should return (Value, false, nil) if the value can be retrieved from v but it not necessarily present.
	// GetFrom should return (nil, false, nil) if the value cannot be retrieved from v.
	// GetFrom should return (nil, false, ErrNotConcretizable) if the value path is not concretizable.
	GetFrom(v Value) (result Value, alwaysPresent bool, err error)
}

type ValuePathSegment

type ValuePathSegment interface {
	Value
	// SegmentGetFrom should return (Value, true, nil) if the value can be retrieved from v and is necessarily present.
	// SegmentGetFrom should return (Value, false, nil) if the value can be retrieved from v but it not necessarily present.
	// SegmentGetFrom should return (nil, false, nil) if the value cannot be retrieved from v.
	// SegmentGetFrom should return (nil, false, ErrNotConcretizable) if the value path is not concretizable.
	SegmentGetFrom(v Value) (result Value, alwaysPresent bool, err error)
}

type VarData

type VarData struct {
	Name               string
	Value              Value
	DefinitionPosition parse.SourcePositionRange
}

type Walkable

type Walkable interface {
	Value
	WalkerElement() Value
	WalkerNodeMeta() Value
}

An Walkable represents a symbolic Walkable.

type Walker

type Walker struct {
	// contains filtered or unexported fields
}

A Walker represents a symbolic Walker.

func (*Walker) IsMutable

func (w *Walker) IsMutable() bool

func (*Walker) PrettyPrint

func (r *Walker) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Walker) Test

func (r *Walker) Test(v Value, state RecTestCallState) bool

func (*Walker) WidestOfType

func (r *Walker) WidestOfType() Value

type Watchable

type Watchable interface {
	Value
	WatcherElement() Value
}

An Watchable represents a symbolic Watchable.

type Watcher

type Watcher struct {
	// contains filtered or unexported fields
}

An Watcher represents a symbolic Watcher.

func NewWatcher

func NewWatcher(filter Pattern) *Watcher

func (*Watcher) ChunkedStreamElement

func (r *Watcher) ChunkedStreamElement() Value

func (*Watcher) IsMutable

func (w *Watcher) IsMutable() bool

func (*Watcher) PrettyPrint

func (r *Watcher) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Watcher) StreamElement

func (r *Watcher) StreamElement() Value

func (*Watcher) Test

func (r *Watcher) Test(v Value, state RecTestCallState) bool

func (*Watcher) WatcherElement

func (r *Watcher) WatcherElement() Value

func (*Watcher) WidestOfType

func (r *Watcher) WidestOfType() Value

type WrappedBytes

type WrappedBytes interface {
	Iterable
	// contains filtered or unexported methods
}

An WrappedBytes represents a symbolic WrappedBytes.

type WrappedString

type WrappedString interface {
	Value
	// contains filtered or unexported methods
}

A WrappedString represents a symbolic WrappedString.

type Writable

type Writable interface {
	Value
	Writer() *Writer
}

A Writable represents a symbolic Writable.

type WritableStream

type WritableStream struct {
	// contains filtered or unexported fields
}

An WritableStream represents a symbolic WritableStream.

func NewWritableStream

func NewWritableStream(element Value) *WritableStream

TODO: add chunk argument ?

func (*WritableStream) ChunkedWritableStreamElement

func (r *WritableStream) ChunkedWritableStreamElement() Value

func (*WritableStream) IsMutable

func (s *WritableStream) IsMutable() bool

func (*WritableStream) PrettyPrint

func (r *WritableStream) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*WritableStream) Test

func (r *WritableStream) Test(v Value, state RecTestCallState) bool

func (*WritableStream) WidestOfType

func (r *WritableStream) WidestOfType() Value

func (*WritableStream) WritableStreamElement

func (r *WritableStream) WritableStreamElement() Value

type Writer

type Writer struct {
	UnassignablePropsMixin
	// contains filtered or unexported fields
}

func (*Writer) GetGoMethod

func (w *Writer) GetGoMethod(name string) (*GoFunction, bool)

func (*Writer) IsMutable

func (*Writer) IsMutable() bool

func (*Writer) PrettyPrint

func (*Writer) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Writer) Prop

func (w *Writer) Prop(name string) Value

func (Writer) PropertyNames

func (Writer) PropertyNames() []string

func (*Writer) ReadAll

func (w *Writer) ReadAll() (*ByteSlice, *Error)

func (*Writer) Test

func (w *Writer) Test(v Value, state RecTestCallState) bool

func (*Writer) WidestOfType

func (*Writer) WidestOfType() Value

func (*Writer) Writer

func (Writer *Writer) Writer() *Writer

type XMLElement

type XMLElement struct {
	// contains filtered or unexported fields
}

A XMLElement represents a symbolic XMLElement.

func NewXmlElement

func NewXmlElement(name string, attributes map[string]Value, children []Value) *XMLElement

func (*XMLElement) Attributes

func (e *XMLElement) Attributes() map[string]Value

result should not be modified.

func (*XMLElement) Children

func (e *XMLElement) Children() []Value

result should not be modified.

func (*XMLElement) IsMutable

func (*XMLElement) IsMutable() bool

func (*XMLElement) Name

func (e *XMLElement) Name() string

func (*XMLElement) PrettyPrint

func (r *XMLElement) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*XMLElement) Test

func (r *XMLElement) Test(v Value, state RecTestCallState) bool

func (*XMLElement) WidestOfType

func (r *XMLElement) WidestOfType() Value

func (*XMLElement) Writer

func (r *XMLElement) Writer() *Writer

type XMLInterpolationCheckingFunction

type XMLInterpolationCheckingFunction func(n parse.Node, value Value) (errorMsg string)

type Year

type Year struct {
	SerializableMixin
	ComparableMixin
	// contains filtered or unexported fields
}

A Year represents a symbolic Year.

func NewYear

func NewYear(v time.Time) *Year

func (*Year) Concretize

func (d *Year) Concretize(ctx ConcreteContext) any

func (*Year) IsConcretizable

func (d *Year) IsConcretizable() bool

func (Year) IsMutable

func (d Year) IsMutable() bool

func (*Year) PrettyPrint

func (d *Year) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Year) Static

func (d *Year) Static() Pattern

func (*Year) Test

func (d *Year) Test(v Value, state RecTestCallState) bool

func (*Year) WidestOfType

func (d *Year) WidestOfType() Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL