Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

4.1.0 - 2024-09-03

Changed

  • Upgraded serialization library to 7.0.0

4.0.0 - 2024-08-07

Added

  • Support for observations in contracts has been added.

  • Support for observations in CSL scenario tests has been added.

Changed

  • Improved abstract expression analysises of less-than expressions.

  • Improved abstract expression analysises of application-expressions, which makes the analysis faster.

  • CSL Scenario-test now makes use of the NormalContract representation which implements deferred matching.

  • Updated com.deondigital:serialization to version 5.0.0.

Fixed

  • Fixed an issue that could lead to an infinite loop in contract analysis for very specific cases.

  • Fixed an issue where the unification done during expression analysis would fail to find a substitution.

Removed

  • Opaqueness control and tracking in expression evaluator has been removed.

  • Functionality to simplify an Exp value via “normalisation by evaluation” has been removed.

  • Removed the webapp and API that supported the Vitznauerstock demonstration application.

  • Removed the sic-rest-operations and moved relevant wrapper classes to sic-preamble-core.

  • Removed the possibility of generating TypeScript classes from CSL with sic.

3.0.0 - 2023-12-07

Added

  • sic for Kotlin includes an instance of a com.deondigital.serialization Json codec on the companion object for classes generated from CSL types.

  • Static unfolding of NormalContract via a function unfold into a tree-structure where prefix-predicates have been analyzed.

Changed

  • sic for kotlin now adds a companion field on ContractInstance with the entrypoint of the contract.

  • Minimum supported JDK is now 17. Was 1.8 previously.

Removed

  • Support for the Corda 4.x ledger backend has been removed.

2.0.0 - 2023-03-09

Added

  • CSL Language: Added an optional “prefix guard” to contract prefixes, which defines patterns that must match in addition to the predicate given by there where-clause.

  • The sic Gradle plugin now works with version 1.7.x of the Kotlin Gradle plugin.

  • sic generates Kotlin componentX() methods on classes from record types that can be used in destructuring expressions.

  • Added support for Corda 4.10.

Changed

  • Added support for trailing commas in CSL.

  • The upgrade-from-0-82-0-to-0-83-0 package has been renamed to upgrade-csl-corda-states to reflect its more generic nature.

  • Artifact repository changed from https://repository.deon.digital/artifactory/releases to https://dl.cloudsmith.io/basic/deondigital/releases/maven/.

Fixed

  • Fixed a bug where the typechecker would crash if type variables were present in record field definitions.

  • Fixed a bug in generation of arbitrary dates, which prevented properties on Date type to be exercised correctly.

Removed

  • Removed the dependency on com.github.kittinunf.fuel.

1.0.0 - 2022-09-05

No changes between 0.84.0 and 1.0.0.

0.84.0 - 2022-08-31

Added

  • Added a new target to sic called Compile. This target compiles the input CSL to a “CSL package”.

  • Added documentation on application development explaining CSL integration.

  • Added new next-events analysis based on symbolic evaluation of expressions.

Changed

  • Some classes and top-level functions were moved to different packages to avoid package name clashes across jars. See the migration guide for details.

  • The gradle-sic-plugin now uses sic compile to compile the CSL declaration. The name of the resulting artefact is now <sicNamespace>.declaration.cslpkg instead of <sicNamespace>.definitions.zip.

  • The package com.deondigital.core.logging has been moved to a separate project. See the migration guide for details.

  • sic can now only receive one command-line input at a time.

  • sic can now be pointed to a folder with a deon-project or directly to the deon-project file, instead of relying on globbing.

  • sic now has two sub-commands: generate and compile.

    • generate can target Kotlin or Typescript.

    • compile outputs to stdout or a cslpkg file given with --output.

    • generate can take a new option --cslpkg pointing to a cslpkg file. If this option is given, the ContractDetails class also contains a static val pointing to the cslpkg file.

  • The utility library for specifying benchmark workloads has been moved to a separate project. See the migration guide for details.

  • The package com.deondigital.pretty-print has been moved to a separate project. See the migration guide for details.

  • The library for (de)serialization JSON and MsgPack has been moved to a separate project. See the migration guide for details.

  • Agent anonymization behaviour on Corda has changed:

    • All participants are always anonymized.

    • All agent values pointing to anonymized participants are always deanonymized when fetching events, calling reports and fetching instantiation parameters.

  • com.deondigital.cordapp.services.SetParticipantsAnswer.AuthorizeEnterContract is now an object instead of a data class.

  • com.deondigital.cordapp.services.InstantiateContractAnswer.Authorize is now an object instead of a data class.

  • com.deondigital.cordapp.services.NovateContractAnswer.AuthorizeEnterNovation is now an object instead of a data class.

  • The public documentation has been re-organized under topics for readability.

  • The vitznauerstock demo webapp no longer attempts to normalize where-clauses for residual contracts.

Fixed

  • Fixed a bug in TypedJsonSum.restrict where an incorrect tag-value would be used. It caused .restrict to not work on api.Value.

  • Fixed a bug in mutually recursive contract bindings in let blocks.

Removed

  • Removed the CoreAST, Signature, Ontology and MetaData targets for sic. These are replaced by the compile sub-command.

  • Removed JSON output support from sic.

  • Removed com.deondigital.api.ExternalObject.CordaAgent.isConfidential.

  • Removed com.deondigital.sic.CordaAgent.isConfidential.

  • Removed com.deondigital.cordapp.client.CordaAgent.isConfidential.

  • Removed anonymize: Boolean parameter from com.deondigital.cordapp.services.SetParticipantsAnswer.AuthorizeEnterContract.

  • Removed anonymize: Boolean parameter from com.deondigital.cordapp.services.InstantiateContractAnswer.Authorize.

  • Removed anonymize: Boolean parameter from com.deondigital.cordapp.services.NovateContractAnswer.AuthorizeEnterNovation.

  • Removed compareAgentsByWellknownIdentities parameter from ContractHandler.report.

  • Removed agentToWellKnown parameter from CordaEntityModule. Agents are now always compared by their well-known identities when possible.

  • Removed addReverseAgentMapping from ReportingManager.

  • Removed reverseAgentMapping from com.deondigital.corda.common.CordaEntity.toExternalObject.

  • Removed agentMappings from CachedTransactionChanges, TransactionChangesInLedger, CachedCSLContractState, InternalCachedCSLContractState, and VersionProvenance.

  • Removed reverseAgentMapping from CachedCSLContractState and InternalCachedCSLContractState.

0.83.0 - 2022-06-01

Added

  • Added a new Datalog engine, resulting in dramatically faster querying of relations.

  • Serialization: Added a helper function for restricting typed OpenAPI sum codecs to a single tag.

  • Serialization: Added functionality for versioning serialization MessagePack codecs.

  • Added an upgrade script to migrate Corda CSL contracts that were compiled with sic 0.82.*.

  • CSL unit tests now support scenarios, which allow a contract to be tested against a series of events and assertions that it should support.

  • Add a cslName property to all record classes generated by sic. This property gives the CSL name of the record’s type.

Changed

  • The internal representation of environments has been split into global and local environments, making it no longer necessary to minimize closures when constructing function values. The evaluator APIs have been simplified as a result.

Fixed

  • Before, CordaLedger.getAllContractIds() would return an immutable view on a mutable set. This meant that concurrent threads could mutate this seemingly immutable set. This method now returns a copy of the set instead.

0.82.1 - 2022-05-09

Fixed

  • Fixed a bug where a type error in the scrutinee of a match expression would crash deon-check and the LSP server.

  • Fixed a bug where CachedCSLContractState.versionedEvents would show the empty sequence of events for any version after the version in which the total of applied events exceeded 2.

  • Fixed a bug in clojure testing setup, where failing tests would not render correctly.

0.82.0 - 2022-04-05

Added

  • Support for a separate shared events cache in CordaLedger that can be bounded in size in addition to the contract cache.

  • Added an upgrade script to migrate Corda CSL contracts that were compiled with sic 0.81.0.

  • CSL value definitions can be marked as properties, which enables them to be used for testing.

  • Added support for CSL unit tests, including the use of external test oracles such as Excel models.

  • sic now also produces a meta-data file containing the ABI version of its outputs.

  • CSL stdlib: Added function Map::isEmpty for testing whether a map is empty.

  • CSL stdlib: Added function comp for composing two unary functions.

  • CSL stdlib: Added function via for transforming inputs to a binary function before applying it.

  • CSL stdlib: Added functions compareDate and compareTime for comparing date and time, respectively.

  • CSL stdlib: Added function Maybe::map2 for lifting a binary function to one in Maybe.

  • CSL stdlib: Added function Map::lookupOrDefault for a lookup in a map with a default value in case of failure.

  • CSL stdlib: Added function Map::toList for turning a map into a list of (key, value) tuples.

  • CSL stdlib: Added function List::takeWhile for taking a prefix of a list as long as a given predicate remains true.

  • CSL stdlib: Added function List::isSorted for testing whether a list is sorted according to a given comparison function.

  • CSL stdlib: Added functions Ordering::twoStep and Ordering::lexicographic for combining comparison function for more complex data types.

  • CSL stdlib: Added functions min, max, List::minimum and List::maximum for finding maximum and minimum of two arguments or a list of arguments.

  • CSL stdlib: Added function List::contains for checking whether a list contains a given element.

  • CSL stdlib: Added function equal for checking whether two elements are equal

  • CSL stdlib: Added a new built-in NonEmptyList data type with accompanying standard library functions.

  • Added the setParticipants method to ContractHandler.

  • Added an RX Observable property QueryMonitor.onUnanswerableRequest that can be used to react to query monitor requests that are not answerable automatically with the given RespondPolicy.

  • Added configuration argument to Queries.pastEvents to customize the order of the sequence of events.

  • Added support for scoping CordaLedger to all CSL attachments that are compatible with a given main attachment.

  • Added MessagePack serialization helper function isoMsgPackCodec.

  • Added a match expression for direct pattern matching on expressions.

  • Added a simple coarse-grained cache for CSL report results.

Fixed

  • Fixed a bug where the deferred matching engine would create very large runtime representations of some contracts and would crash for contracts with unbounded loops.

  • Fixed a bug where addEvents would throw CordaRuntimeException instead of RuntimeException in certain cases of failed event application.

  • Fixed a bug where a migration would cause reports with compareAgentsByWellKnownIdentities=true to change behaviour.

  • Fixed a bug where a migration from and to the same declaration would cause the events before the migration to be listed in pastEvents and therefore also in reports.

  • Fixed a bug where methods to novate, terminate, authorize migration, migrate, and change contract participants finished before updating the cache.

  • Serialized timezones in the form of offsets are now supported. Previously, only named zones such as “Europe/Copenhagen” were supported.

Changed

  • CachedCSLContractState no longer stores pre-materialized events.

  • ContractHandler now exposes CachedCSLContractStateHandle from its member functions instead of CachedCSLContractState which consists of pre-materialized CachedCSLContractState object in property data and functions to access required events for the contract.

  • Queries.pastEvents() exposes a Sequence of past events that can be consumed lazily instead of a pre-materialized list.

  • ContractHandler now requires a CacheConfiguration object to configure the contract and event cache when it is instantiated instead of a size object.

  • Renamed com.deondigital.cordapp.client.Attachment to ClasspathCslCordaAttachment.

  • gradle-sic-plugin no longer implicitly adds Deon dependencies.

  • Renamed constructor argument attachmentInfo in com.deondigital.cordapp.client.{CordaLedger, GenericContractHandler} to attachmentId.

  • Moved report and nextEvents from ContractHandler to CordaLedger. The methods still exist on ContractHandler but simply delegate to CordaLedger.

  • Moved the open method cslCordappConfig from ContractHandler to CordaLedger.

  • QueryMonitor, UserAuthorizationOperations, and RespondPolicy have been moved from sic-preamble-core to csl-cordapp-client.

  • CordaLedger now implements UserAuthorizationOperations.

  • ContractHandler and CordaContractOperations now implement AutoClosable.

  • All flows that modify the ledger contents return LedgerUpdateFlowResult with the original result accessible in the property value.

  • ContractOperationSequenceResult has a new property attachmentId to signify the attachment the contract belongs to.

  • Changed the syntax for polymorphic external declarations to be consistent with type variable binders in value definitions.

  • The serialization helper function newTypeJsonCodec is now called isoJsonCodec.

  • Upgraded to Corda 4.9.

Removed

  • It is no longer possible to define recursive datatypes in CSL.

  • Removed the target and cslVersion configuration option from gradle-sic-plugin.

  • Removed the methods setParticipants, migrateContract, authorizeMigration, terminateContract from CordaLedger. Call the corresponding methods on ContractHandler instead.

  • Removed the method CordaLedger.subscribeToUserQueryFeed in favour of CordaLedger.trackUserQueries.

  • Removed CSLRequest and CSLAnswer from the package com.deondigital.sic. Use the corresponding classes from com.deondigital.cordapp.services which are almost identical.

  • Removed the attachmentId parameter from ExecuteOperationsFlow, SetParticipantsFlow and TerminateContractFlow.

0.81.0 - 2021-11-09

Added

  • com.deondigital.sic.DbLedgerContractOperations backend for the sic ContractOperations wrapper which connects directly to a DbLedger.

  • Added the library com.deondigital:mass-migration which can be used to build interactive mass migration scripts of Corda CSL contracts.

  • Extended the contract-migration example with usage of the mass migration library.

  • Added a new Corda flow FetchCSLAttachments which will list all CSL attachments on the Corda ledger along with some metadata.

  • The ContractHandler can now migrate a contract to an attachment ID other than its own, by explicitly supplying the attachment ID when migrateContract is invoked.

  • The package com.deondigital.debug provides graphical inspectors for values and environments, which can make it easier to understand running CSL code.

  • The VersionProvenance type has been extended with 3 new constructors, MigrationAuthorized, Migrated, ParticipantsChanged to make it easier for consumers to determine the provenance of a contract version.

  • Added more context to the error message provided when an event was rejected because the agent did not match.

  • The package com.deondigital.pretty, in the pretty-print module, contains a Kotlin pretty-printing library.

  • The module deon-pretty contains pretty printers for some datatypes.

Fixed

  • Fixed a bug where identifiers that were only used mutually recursively by a with bound expression were marked as unused.

  • Fixed a bug where a setParticipants call would fail after a novation or batch operation.

  • Fixed a bug where custom CSL Cordapp configurations would be ignored during contract migration.

Changed

  • Added a standalone flow to authorize contracts for migration.

  • Removed the use of contract termination as the first step of contract migration.

  • Renamed com.deondigital.benchmark package that exposes benchmarking utility classes to com.deondigital.benchmarkingutils.

  • Changed the methods of CSLFLows to return FlowDispatch instead of invoking flows directly. This allows callers to themselves determine how call the flows (e.g. tracked or untracked).

  • Improved the error message when there are multiple or zero parties matching an identity in ContractHandler.getParty.

  • Changed the signature of CSLCordappConfigure.createContractState to receive an instance of DefaultCSLContractState in order to facility newtype style wrapping instead of reimplementing all fields of DefaultCSLContractState.

0.80.0 - 2021-09-14

Added

  • CSL source code must always be written in the UTF-8 encoding (this formalises the existing state CSL practice).

  • All released JARs now contain the name and version of the package in the META-INF/MANIFEST.MF file.

Fixed

  • Fixed a bug in conversion of api.ListValue to clojure list. The conversion would result in a LazySeq and not a proper IPersistentList value.

  • Fixed a bug where exceptions thrown whilst responding to a contract update would be swallowed. Note that to respond properly to exceptions in this case, you should provide a second argument to Observable.subscribe.

  • Fixed a bug on Corda where a failed event application would indefinitely hospitalize the responder flow.

  • The standard library is now embedded in CSL-related executables rather than being found in a separate file, making it even less likely that --csl-std-lib is necessary.

Changed

  • The classes in the namespace com.deondigital.cordapp.client have been moved into their own Gradle artifact and therefore also out of the CSL workflows cordapp.

  • All definitions from the clojure-api library have been moved into a new clj-api subpackage.

Removed

  • Removed the type parameter from ResponsePolicy.Always.

  • Removed the c property from com.deondigital.sic.CordaAgent.

  • Removed the CordaLedger.getInitialStates method.

0.79.0 - 2021-08-10

Added

  • Added support for migrating running contracts to new declarations on Corda.

  • Added an example Cordapp project to demonstrate the usage of migration support.

  • Command-line CSL tooling can now automatically locate the standard library in more situations, making it less often necessary to pass the --csl-std-lib option.

Fixed

  • Fixed a bug resulting in an exception when getting contract details after changing the contract participants.

  • Fixed a bug that caused the typechecker to crash if it encountered a non-wellformed type composed of types defined in different files.

  • Fixed a bug where you could not use the unqualified name of a recursive contract within its definition.

Changed

  • Changed the behaviour of the SetParticipants flow to reuse the existing anonymous identity for current participants of the contract that are also in the new set of participants.

Removed

  • Removed the helper CLI tool attachment-uploader for uploading attachments to Corda nodes.

0.78.0 - 2021-07-28

Added

  • Add alternative runtime for CSL contracts implementing the “deferred matching semantics”. Under this semantics, events are applied at all enabled prefixes in the contract, as opposed to the state tree runtime which prematerely “cuts off” alternative branches as soon as a prefix matching the incoming event is found. The new API is available under the com.deondigital.runtime.deferred namespace.

Fixed

  • Fixed a bug where the Corda CSL cache would ignore all remaining output states from a vault update when an output state was encountered with a different attachment id.

  • Fixed a bug where CordaLedger could see and interact with contracts that were not instantiated with its associated declaration.

  • Fixed a bug where the version number of a contract was incremented twice when terminated.

Changed

  • CordaLedger and ContractHandler now exposes a single Observable you can subscribe to for all contract updates. The old subscription mechanism still exists but is deprecated.

0.77.0 - 2021-06-18

Added

  • CSL now emits a warning when a pattern is unreachable due to earlier patterns having exhausted the space of possible values.

  • The next-events analysis now allows some names to be declared “opaque”. Opaque names are only unfolded when said unfolding leads to a non-function value.

Changed

  • The deon-language-runtime project now properly declares the dependency on com.github.andrewoma.dexx as api, so consumers no longer have to add this group as implementation dependencies in Gradle.

  • The LSP server binary for CSL has been renamed from language-server to csl-lsp-server to avoid confusion.

Fixed

  • Fixed a bug where the Corda GenericContractHandler would assume only one legal-identity for all nodes and crash in case there were multiple.

  • Fixed a subtle variable scoping bug in the contract guardedness checker

  • Fixed a rare bug in ResourceIndexedReadWriteLockManager due to memory visibility issues on lock cleanup.

0.76.0 - 2021-05-28

Added

  • DbLedger now has support for concurrent reads and writes to separate contracts.

  • Added auto-completion support for local definitions and qualified names relative to the module scope in LSP server.

  • CSL now requires that all pattern matches cover all possible cases

  • Added syntax for explicitly binding type variables in definitions.

  • Added support for referring to bound type variables in type annotations.

Changed

  • Upgraded Corda from version 4.5 to 4.8.

Fixed

  • Fixed a bug in the guard checker which incorrectly rejected contracts that made advanced use of templates.

  • Fixed a bug where top-level value declarations could shadow generated equality functions.

  • Fixed a bug in the Gradle sic plugin that made it hide resource files in main/resources from the JAR artifact.

  • Fixed a bug where type constraints were not propagated under type constructors.

  • Fixed a bug where equality was allowed on polymorphic tuples.

  • Fixed a bug where equality tests on a type A would crash in standalone reports if no values of that type were equated in the declaration.

  • Fixed a bug where relations could be redeclared.

0.75.0 - 2021-04-09

Added

  • Added support for module-relative references to CSL.

  • Added auto-completion support for top level and modules’ definitions in LSP server.

  • Added contract novation to DbLedger and Corda.

  • Added support for checkpointing of contract state tree to DbLedger.

  • Added eventName field to the EventPredicate API object from /next-events.

  • Added clojure-api for using CSL from Clojure. Includes conversions back and forth from Clojure values to com.deondigital.syntax and com.deondigital.api values. Also a runtime library for instantiating contracts and evaluating expressions is included.

  • Added support in CSL for adding custom built-ins via external declarations.

  • Added auto-completion support for record construction and projection in LSP server.

Fixed

  • Contract instantiations on DbLedger must have at least one participant.

  • Notifications to callbacks and replication requests in DbLedger are only sent if the changes to the underlying ledger are successful.

  • TypeScript code generated by sic now has type mappings for Corda contract IDs.

  • OpenAPI supports authorization with a peer identity, allowing calls that require an agent identity argument.

  • Fixed bug in sic that stopped the code generation if the input CSL source contained a record or union type with a nested function type.

  • Fixed a bug in the type checker that made it accept usage of derived equalities on types for which an equality function could not be derived due to nested function types or type variables.

  • Added missing classes to the serialization whitelist for the Corda runtime.

  • Corrected a bug in the initialization of the DbLedger connection to PostgreSQL.

  • Fixed a bug that would crash the demo webapp when using a contract id as an instantiation argument.

  • Fixed a bug in the webapp that would reset the list of entrypoints when a contract was instantiated.

  • Fixed a bug in the type checker that made it accept functions as map keys or set values, which would lead to runtime errors.

  • Fixed a bug in evaluation of certain builtins and “open values”.

Changed

  • Changed the caching of relevant data in DbLedger to be constrained based on cache size.

  • Kotlin-code generated by sic now depends on packages com.deondigital:sic-rest-operations and/or com.deondigital:sic-corda-operations to supply the ContractOperations and related types, instead of generating bespoke versions of them at each run.

  • The next-events analysis now performs reduction on the returned where-clauses using a “normalization by evaluation” algorithm.

  • The DeonWebservice now takes the concrete agent identifiers as config parameters instead of auto-generating fresh ones.

  • Cosmetic improvements to the demonstration webapp.

  • Sic now appends “Module” to the subtypes of ContractModule that it generates.

  • The sic gradle plugin now checks the generated jar for Corda compatibility, if the target is Corda.

  • Contract lookup in ContractOperations returns null instead of ContractInstanceNotFound when no contract with that ID exists. The exception type has been removed.

  • Parser now also accepts empty fields in projection.

0.74.0 - 2021-02-18

Added

  • New types for working with calendars and time: Period, Year, Month, YearMonth, Date, Time, DateTime, ZonedDateTime and ZoneOffset.

  • Added support for terminating contracts on Corda.

  • Added support for the 1/1 day count convention.

Fixed

  • New implementation of the Actual/Actual ICMA day count convention

  • Fixed bug in ExecuteOperationsFlow in Corda that allowed event applications on behalf of an agent who is not the proposer of the transaction when combined with contract instantiations.

  • Fixed bug in RestContractOperations.execute where exceptions were not serialized correctly.

  • Type checking in atomic operations.

Changed

  • The DateTime type has been renamed to Instant. There is still a DateTime type, but it is different from the old one.

  • Simplified core representation of template definitions.

  • Make use of explicit functions to construct a runtime representation from an entrypoint and a list of values instead of relying on building up a contract AST.

  • Don’t store contract AST in DbLedger in the Contracts table.

  • Made sidebar in the demo webapp scroll independently of the CSL editor.

  • Changed instantiation arguments to be a single value instead of list

  • EntryPoint, instantationArgument and instantationTime have been moved to instantationDetails in the Contract object of DeonAPI.

0.73.1 - 2021-02-15

Fixed

  • Fixed a bug that prevented applications to upload attachments to Corda nodes twice.

  • Made the artifact produced by the Gradle sic plugin byte-for-byte reproducible.

Changed

  • Use compiled declarations for named reports instead of recompiling.

0.73.0 - 2021-01-20

Added

  • A CorDapp example showing integration between a CSL contract and the Corda Token SDK.

  • Added support for terminating contracts on DBLedger, which disallows applying further events on the contract.

  • Entrypoints must no longer be specified as a template. The form contract entrypoint main = ... is now accepted.

Fixed

  • Type checking of contract instantiations has been fixed on Corda. Templates with missing entrypoint were previously accepted but are now rejected. Entrypoints using the new contract lambdas for taking instantiation parameters were previously rejected, but are now accepted.

Changed

  • The Gradle sic plugin now has the plugin id com.deondigital.gradle-sic-plugin. This is the name that should be used in an apply plugin: section in a Gradle build script.

  • The Gradle sic plugin no longer builds a fat jar that includes csl-cordapp and csl-contracts-states. Instead, only the generated code and AST are included in the built jar.

  • The demo webapp now has a drop-down with all entrypoints in a CSL declaration. Each entrypoint has a set of input forms derived from its parameter types for setting instantiation arguments.

  • All internal serialization has been changed from JSON to the binary MessagePack format. This improves serialization and deserialization of contract state by an order of magnitude.

  • QueryMonitor now responds to contract authorization requests from the query service (e.g., instantiation) in a non-blocking fashion and using its own threadpool to prevent concurrency issues.

0.72.0 - 2020-11-24

Added

  • Added the functions Math::ceiling, Math::floor, and Math::round to the standard library.

  • Added support for atomic execution to DbLedger.

  • Added the conversion Float::toInt to the standard library.

  • Templates can now specify contract parameters that are contract functions.

Changed

  • Guarded recursive contract definitions are now allowed.

  • Template application now requires the contract-parameter list to be given. Previously, given template T x = ... you could apply T with T 42, omitting the empty list of contract arguments. Now, you have to write T[] 42.

  • Integers are now 64 bits, extending their range to the interval [-9223372036854775808, 9223372036854775807].

  • Subdivided the com.deondigital.cordapp package namespace into states, flows, services, resources, client subpackages.

  • Optimized execution of Corda flow (ExecuteOperationsFlow) to minimize overhead of copying ledger state and parsing non-essential declarations.

0.71.0 - 2020-11-05

Added

  • Added a QueryMonitor class for handling contract instantiation requests in sic-generated Corda applications.

  • The deon-project file format now allows single-line comments starting with #.

  • You can now write contract-lambdas with pattern matching.

Fixed

  • Fixed a bug in the gradle-sic-plugin which made it impossible to fetch dependencies that it injected into projects.

Changed

  • Template expression parameter syntax changed from (a, b, c) to a b c. The current syntax is still valid but denotes a tuple parameter instead.

0.70.0 - 2020-10-16

Added

  • CordaLedger now supports specification of groups of operations (contract instantiations and event applications) atomically iff the operations span the same participants and notary.

  • CordaLedger now supports both anonymous and non-anonymous participants in contracts.

  • All contract instantiations in CordaLedger now require authorization by the client and are not automatically accepted as before.

  • The sic gradle plugin now tracks changes to CSL files.

  • sic can now open the “file” - which causes it to read from stdin.

  • Added support for instantiating Sum and Record types to the webapp.

  • Added support for empty tuples.

  • Added the Unit type as an alias to the empty tuple.

  • The DbLedger can now distribute events and contracts to other read-only “subscriber instances” of DbLedger.

  • Added a new Maven package com.deondigital.sic which wraps the sic binary for easier use in JVM based projects.

Fixed

  • Improved performance of the internal cache representation of events in DbLedger.

  • Corrected an issue with CSL project files not having trailing whitespace.

  • Fixed a bug in sic/Kotlin that made it impossible to instantiate entrypoints inside a module.

  • Fixed a bug in the automatically generated equality functions for types involving a typealias parameter.

  • Fixed a bug in sic/Kotlin that caused the generated code to crash the Kotlin compiler when a sufficiently long CSL source text was embedded.

Changed

  • Renamed the built-in type Contract to ContractInstance.

  • Going forward, .jar artifacts are no longer published with a prefixed v or -SNAPSHOT modifier.

  • Published .jar artifacts have been moved from nexus.deondigital.com to the Gitlab package registry. This requires an update to all build credentials.

0.69.0 - 2020-09-18

Added

  • The DbLedger now maintains a hash-chain on all events it stores to make it less easy to tamper with the underlying database.

Fixed

  • Fixed a bug that caused the DbLedger to not persist participant IDs correctly.

0.68.0 - 2020-09-10

Added

  • The standard library now has String::isEmpty function.

  • Built-in Set data type with accompanying standard library functions.

  • A new API end point /contracts/{id}/residual has been added which can be used to examine the current state of a contract.

  • EventPredicate now contain a residualContract and corresponding environment, describing the state of the contract after the event is applied.

  • The Corda contract manager now supports changing the set of participants in a running contract. A flow for this purpose can be instantiated from the API.

  • The type checker will now emit warnings on unused local val, contract, and template definitions.

Fixed

  • Fixed a bug where CordaLedger.contractId was not initialized with contracts that had one or more events applied.

  • Fixed a bug in the runtime value type checker that made it not check Map values.

  • Removed the tagOrNull override in the jsonCodec for ContractUpdate as it was dead code, after an update to the webapp which fixed an issue with needing a refresh after instantiating a contract.

0.67.0 - 2020-08-10

Added

  • Added methods for subscribing to contracts and events added on Corda.

Changed

  • Corda flows to collect signatures and generate new identities have been optimized to improve performance of contract instantiation and event application.

  • ContractOperations.getInstance now returns null when no instance is found instead of throwing ContractInstanceNotFound and throws ContractInstanceWrongType when trying to get contract as type A when the instance is actually of some other type B.

0.66.0 - 2020-06-26

Added

  • sic-generated Kotlin classes for CSL datatypes now contain custom toString() methods.

Changed

  • DbLedger now supplies the triggering event in the contractUpdated callback.

  • CordaLedger now caches contract ids so it will not fetch all initial states on each report.

  • Corda contract manager: Corda was upgraded from 4.4 to 4.5.

Fixed

  • Fixed a bug where pagination errors appeared during contract event application when the number of contract instances in the ledger exceeded the default page size (200).

0.65.0 - 2020-06-19

Fixed

  • Fixed bug where the exception CannotApplyEvent only contained the message null instead of the list of errors. This makes log messages more useful.

Changed

  • Corda contract manager: Agents returned from reports are now identified by their well-known keys instead of their confidential (randomized, pseudonoymous) keys.

  • Corda contract manager: Applications can now run reports in a mode where agents are compared by their well-known identities instead of their confidential keys.

0.64.0 - 2020-05-28

Fixed

  • Fixed bug where sic generated TypeScript would generate different CordaAgent type than used in api-client.

Changed

  • DBLedger no longer checks for visibility/existence of contract-id values in inputs to reports. This is consistent with the behaviour on Corda.

  • The demo webapp now has UI components for creating CSL Maps. The UI components for CSL List and Bool have been improved.

0.63.0 - 2020-05-20

Changed

  • Contracts and events on the DBLedger are now only visible to peers that are participants of the contract.

  • The REST API has been split up into an anonymous API with endpoints that do not need the identity of the caller, and an identified API that does need it.

Fixed

  • Fixed a bug where sic generated TypeScript would crash at runtime due to circular imports.

  • Fixed a bug where SecureHash in CordaEntity was not serialized correctly. This broke contract validation for contracts containing contract ids.

0.62.0 - 2020-05-07

Added

  • sic generated TypeScript now includes a CordaAgent variant of Agent.

Removed

  • The “AST view” in the demonstration webapp has been removed.

  • The /contracts/{id}/tree API endpoint has been removed.

Changed

  • sic now generates a structured Agent object for TypeScript instead of a string for CSL Agent.

Fixed

  • Fixed a bug related to Kryo serialization where a Corda node would crash while suspending a flow trying to persist the stack frame.

0.61.0 - 2020-04-29

Added

  • Support for fully validating contract manager on Corda that keeps the full contract state on the ledger and checks for event validity on every event application.

  • Support for batched application of CSL commands (instantiation and event application). Currently only batched event application are exposed by flows.

  • Support for versioning, indexing and querying on contract state fields.

  • Internal integration tests in cordapps that test contract verification, flows, vault storage and querying.

  • It is now possible to publish generated CorDapps locally to make the development process simpler.

Removed

  • Unused resources model.

Changed

  • cordapp-examples do not use relocation any more.

  • Simplified the implementation of the caches, flows, vault storage and retrieval functionality.

Fixed

  • Corrected a bug in the gradle-sic-plugin that caused it to fail when project files lacked a trailing newline.

  • Corrected a bug in the gradle-sic-plugin that caused it to deadlock sometimes on MacOS.

0.60.0 - 2020-04-15

Changed

  • Upgraded Corda target platform from 4.0 to 4.4.

  • TypeScript code generated by sic no longer adds equals/hashCode methods on Object.prototype.

  • Significant performance improvements to the evaluator and contract executor. Tail-recursive contracts no longer get slower over time.

Fixed

  • Fixed a bug related to Kryo deserialization where a Corda node would crash if resuming a flow from a persisted snapshot.

  • Fixed a bug in the derivation of derived equality functions that caused runtime exceptions when one derived an equality function for a constructor with fixed type parameters.

0.59.0 - 2020-03-27

Changed

  • The TypeScript code generated by sic now has better support for the immutable-js data structures, in particular the immutable.Map that CSL maps are represented as.

  • sic generated contract operations for DbLedger now returns tags when applying events.

  • Event agents are now validated against contract participants on DbLedger.

Fixed

  • The automatically generated equality functions do not depend on the standard library anymore.

0.58.0 - 2020-03-09

Added

  • sic now generates TypeScript classes for template entrypoints, including a static instantiate method.

Changed

  • CSL reports that are called externally (with, e.g., sic) must be marked with the new report keyword.

  • Contract templates that are used as entrypoints (from, e.g., sic) must be marked with the new entrypoint keyword.

  • Event application on the DbLedger through the API now always return a tag. Previously it was only when a tag was included in the input.

Fixed

  • Corrected a substitution bug the in report query language that caused wrong results whenever a variable unified with a term which itself contained variables.

  • Corrected an issue in DbLedger that caused wrong external symbols to be used in event application.

0.57.0 - 2020-02-21

Added

  • The deondigital/vitznauerstock Docker image now includes drivers for PostgreSQL.

  • sic now exposes a field instantiationTime on ContractInstance objects.

  • The TypeScript code generated by sic now contains copy methods with named parameters for classes which represent CSL records.

  • Built-in Map data type with accompanying standard library functions.

  • sic now generates Kotlin classes for template entrypoints, including a static instantiate method.

Changed

  • The performance and disk usage of the DbLedger backend has been improved.

0.56.0 - 2020-02-10

Added

  • The Deon webservice now has the endpoint /declaration/{id}/namedReport for invoking a report in a declaration by its qualified name and a list of value arguments.

Changed

  • sic now reports a ContractInstanceNotFound instead of a general exception if a non-existing contract id is used in getContractInstance.

  • the sic type ContractInstance now includes a function for retrieving nextEvents for a contract.

  • nextEvents now include the event predicate and agent as an Exp type.

Fixed

  • Corrected a bug in the type checker that caused it to fail to reject = on records that contained fields for which we cannot use =.

  • Corrected a bug that caused lists that are returned from queries to be wrongly encoded, thereby causing runtime errors.

0.55.0 - 2020-01-28

Added

  • Signature backend to sic that emits as JSON the types of all top-level declarations.

Changed

  • The API endpoints for running reports have been moved from /contracts/{id}/report (/contracts/report) to /declarations/{id}/report (/declarations/report), reflecting the fact that running a report requires just the declaration, not an instantiated contract.

  • The object that represents an instantiated contract now includes the peers that were specified on instantiation.

Fixed

  • Fixed a bug that caused the surface-to-core translation to crash if one used = on a type alias for a built-in type.

0.54.0 - 2020-01-15

Added

  • sic and the gradle-sic-plugin now support deon-project for Corda and Kotlin.

Changed

  • The equality operator = now works on any closed type that does not contain function or Signed types.

Removed

  • The standard library functions Int::equals, Float::equals, String::equals, and DateTime::equals have all been removed.

0.53.0 - 2020-01-09

Added

  • New asynchronous API client.

Changed

  • Update the RESTContractOperations generated by sic to use the asynchronous API client.

  • Reports and contract entrypoints that can be called from the outside must have monomorphic types.

Fixed

  • It is now possible to pass record values that are subtypes of the expected argument value to reports and template instantiations.

0.52.0 - 2019-12-03

Added

  • CSL now supports type annotations on top-level val declarations: val x : Int = 42.

Changed

  • The sic emitters for Kotlin and Corda now generate wrapper classes for the ledger-specific representations of Agent and ContractId to make it possible to use the same code on top of both DBLedger and Corda.

  • The API type Contract now contains the fields entryPoint and instantiationArguments.

  • The sic emitters for Kotlin and Corda generate the ContractOperations interface and RESTContractOperations/CordaContractOperations implementations which can be used to interact with the sic-generated contract API in a ledger-agnostic way.

0.51.0 - 2019-11-22

Added

  • The TypeScript code generated by sic now contain factory methods for creating objects with named parameters.

  • The Kotlin code generated by sic now contains copy methods with named parameters for classes which represent CSL records.

  • CSL now supports type aliases: typealias MyType a = Tuple a Int.

Changed

  • Ontology backend to sic was changed to output only type definitions instead of the internal contract descriptors of sic.

  • Code generated by sic now inspects API values for their actual types when deserializing, instead of statically deserializing values to their indicated type. This means that a record MyEvent can be correctly deserialized from a value that is statically typed as Event but dynamically tagged as MyEvent.

  • The gradle-sic-plugin has been updated to better handle multiproject builds.

0.50.0 - 2019-11-08

Changed

  • The csl-plugin has been removed. It is superseded by the new gradle plugin gradle-sic-plugin.

  • sic output is now available when using --info with the gradle plugin.

Fixed

  • sic no longer generates optional parameters for the TypeScript target which caused problems when mixing optional and required parameters.

0.49.0 - 2019-10-29

Added

  • New record extension syntax for carrying over some of the fields of an existing record into a new one: R { use x with a = 1, b = 2 }.

Fixed

  • Corrected a bug that prevented instantiation of contracts with sic generated code on Corda nodes.

0.48.0 - 2019-10-24

Added

  • DateTime::dayCountFraction can now handle the Act/Act ICMA convention.

Fixed

  • Corrected a bug in toContractAST that caused a crash when working with nullable or branches.

Changed

  • The concept of “pseudo value” has been removed in favor of “external objects”. Bound names are no longer to be specified for agents, contracts, etc. represented as CSL values.

  • The DateTime::dayCountFraction function now only takes one parameter. The usual from and to parameters should now be applied to the convention constructor. I.e. DateTime::dayCountFraction (DateTime::ActActISDA #2007-12-28# #2008-12-28#).

0.47.0 - 2019-10-10

Fixed

  • Corrected a bug in DayCountFraction calculations that occurred when start and end dates are in the same year.

  • Fixed a bug in sic that caused it to not generate code for reports and entry points that use one of the built-in types as input or output types:

    • Ordering,

    • DateTime::DayOfWeek, DateTime::Components, DateTime::DayCountFraction,

    • Event,

    • Duration::Components,

    • RuntimeError.

0.46.0 - 2019-09-27

Removed

  • The sic-maven-plugin has been removed. It is superseded by the gradle plugin csl-plugin.

  • The standard library function getEvents has been removed.

0.45.0 - 2019-09-03

Fixed

  • Corrected a bug in DateTime::dayCountFraction.

Changed

  • Renamed DateTime::dayCountFraction convention Thirty360ISMA to Thirty360ICMA.

Added

  • A list of past events was added to the contract view in the webapp.

0.44.0 - 2019-09-03

Added

  • Added the standard library function DateTime::dayCountFraction that calculates Day Count Fraction for a number of conventions.

Changed

  • The sic “JSON” emitter has been renamed to “CoreAST”.

Fixed

  • Corrected a bug in the publication settings for one of the JAR dependencies which caused the generated CorDapps to break.

0.43.0 - 2019-08-19

Added

  • Ontology backend to sic that emits as JSON the intermediate contract descriptor used by the sic emitters.

Changed

  • The sic-generated Kotlin code does not generate an interface with *Impl class implementations, but just the class implementations directly without the *Impl suffix.

  • The structure in multi-file deon-projects is now more closely reflected in sic-generated TypeScript/Kotlin code.

  • Both the TypeScript and Kotlin code generated by sic introduces an addDeclaration function for putting a CSL declaration on the ledger. The instantiation classes now require a declaration id in their constructors.

  • When sic outputs the JSON-representation of an AST to standard out it does not include the separator strings that are invalid JSON.

Fixed

  • Corrected a bug in the build setup that rendered the Maven-published JAR of deon-api-client unusable.

0.42.0 - 2019-08-05

Added

  • The LSP server now supports go to definition.

  • Added an endpoint contracts/<contractID>/events to get the event that have been applied to a contract.

Changed

  • sic now writes multiple files instead of merging everything into one file. Dependencies on sic generated files will have to be updated accordingly: For TypeScript, the files are renamed; and for Kotlin projects, the generated namespace has changed.

  • The helper functions for serialisation/deserialisation generated by TypeScript backend in sic have been refactored, so sic users will need to make a few changes to their TypeScript code. Instead of mkXValue and getX there are now methods X.toValue and X.fromValue. Also getAgent has been replaced by Agent.fromValue.

Fixed

  • Corrected the code that converts StateTree based residual contracts to their abstract syntax form.

0.41.0 - 2019-07-10

Added

  • The Visual Studio Code plugin now shows type information on mouse hover.

Fixed

  • Made sure the Gradle plugin for generating CorDapps includes everything needed to generate them correctly.

  • Fixed a bug in the TypeScript emitter of sic where records using TypeScript keywords as field names would not function properly.

0.40.0 - 2019-06-28

Added

  • Initial version of the new Datalog-inspired query language.

  • Gradle plugin to generate self-contained CorDapps directly from CSL code.

  • A new backend to sic that emits parsed and compiled CSL syntax as a JSON-file.

Changed

  • Upgraded Corda to 4.0.

  • Upgraded Kotlin runtime to 1.2.

Removed

  • The generic Corda ledger backend has been removed.

  • The Hyperledger Fabric ledger backend has been removed.

  • The special treatment of Evidence records has been removed from the Corda backend.

  • The example oracle implementations have been deleted.

  • The InMemory backend has been removed. It’s superseded by the DbLedger backend.

Fixed

  • Fixed an issue where the service would fail in an unexpected way when fed with certain invalid DateTimes.

  • Fixed an issue where in some cases the type checker would not report error messages in expressions involving records.

0.39.0 - 2019-04-26

Changed

  • Added support for simple simplifications of contracts. The simplifications are used for the contracts presented in the webapp in the “Actions” and “Viewer” tab.

Fixed

  • Fixed an issue where lists in events (records) constructed from the webapp would not be handled correctly.

  • Fixed an issue where the type checker would allow complex patterns at top-level. This is no longer allowed as it was in the old type checker.

0.38.0 - 2019-04-11

Fixed

  • Fixed an issue with floating point equality where numbers were not normalized.

  • Functions can now be serialized which makes it possible to call templates with functions as arguments.

Changed

  • Contracts are now represented more efficiently on the ledger.

  • The evaluator uses a new approach with a global environment instead of closures.

0.37.0 - 2019-04-10

Fixed

  • Fixed an issue with floating point arithmetic operations where they would not use decimal128 rounding.

0.36.0 - 2019-04-09

Fixed

  • Fixed an issue where the type checker would crash instead of reporting an error when a constructor pattern missed an argument.

  • Fixed an issue where the language server would report errors in the wrong file.

Changed

  • The underlying representation of floating point numbers was changed to decimal128 from binary64, allowing more exact financial calculations.

0.35.0 - 2019-04-05

Fixed

  • Fixed an issue where a unary minus was not pretty printed correctly.

  • Fixed an issue with applying events to contracts with inner lets

Changed

  • sic for TypeScript now generates classes instead of type aliases for records.

Removed

  • Removed the corda-light ledger backend. It was not being used and was obstructing further developments and randomly failing CI.

0.34.0 - 2019-03-21

Fixed

  • Fixed an issue in the new type checker where record projection, upcast and type case did not work as expected in certain cases.

0.33.0 - 2019-03-21

Changed

  • The type checker was replaced. It reports multiple error messages and returns an AST annotated with types.

0.32.0 - 2019-03-15

Changed

  • The sic tool now shows warnings on the console when it cannot generate entrypoints.

  • We now disallow shadowing of names in CSL. Shadowing is only disallowed within each name kind. That means value expression names cannot shadow other value expression names but contracts and values can still use the same name.

0.31.0 - 2019-03-12

Fixed

  • Fixed a bug that caused a significant slowdown when evaluating some reports.

Changed

  • Record types in sic-generated code implements the subtyping hierarchy of the CSL source with native target language constructs.

0.30.0 - 2019-03-07

Fixed

  • Fixed an issue that caused the project structure of deon-project files to not be respected in some scenarios.

  • Fixed a bug in the webapp where it would crash when adding a boolean argument to a report.

  • Fixed an issue in the webapp where the wrong declarations were used for instantiating contracts in certain cases.

Changed

  • The contract composer in the webapp has a new layout.

0.29.0 - 2019-02-26

Added

  • Added sic-support for deon-project files.

Fixed

  • Fixed a bug that caused type errors in sic-generated TypeScript code with tuples.

  • Fixed a bug that caused /simplify to crash on certain combinations of contract-parameters and pseudo-syntactic values.

  • Fixed a bug in the agent matching algorithm that made it problematic to have agents with numbers in their name, such as agent1 and agent2.

  • Fixed a bug in the webapp that prevented instantiation of contracts with multiple contract ID parameters.

  • Fixed a bug in the webapp that made it crash when attempting to provide a DateTime argument to a report.

  • Fixed a bug in the webapp where the contents of AST nodes could overflow if it was too large - now the full content will only be visible when the mouse is hovering over the node.

Changed

  • Declarations are identified by content hashes (SHA-256) instead of UUIDs.

  • Upgraded Fabric to version 1.4.

  • The data model for check errors (type errors, parse errors, etc.) has changed. See OpenAPI specification for the new model.

0.28.0 - 2019-01-15

Added

  • Add support for heterogeneous tuple values in CSL.

  • Added support for event tags in sic. Kotlin sic users will need small adjustments to their code.

Fixed

  • Fixed an issue with serialization of websocket values.

  • Fixed a performance issue in the /contracts endpoint that caused it to compute a lot of unnecessary data.

Changed

  • Updated the cache policy for static resources such as documentation and examples to prevent browsers from showing outdated versions.

  • Updated webapp to react 16.7.0

  • Changed default database backend from H2 to SQLite for the DBLedger.

0.27.0 - 2018-12-13

Fixed

  • Fixed duplications of agents on agent list on Fabric.

  • Fixed too liberal type checking of signed data.

Changed

  • Upgraded Corda to version 3.3.

  • Removed dependency on Jackson and improved performance of JSON serialization.

0.26.0 - 2018-12-03

Added

  • Added support for signing of structured data.

Fixed

  • Fixed an issue with instantiation with pseudo-syntactic values in records or lists.

Changed

  • Updated API specification to OpenAPI 3 format. The specification endpoint is changed from /v2/api-docs to /openapi.json.

0.25.1 - 2018-11-23

Fixed

  • Fixed a rendering issue with contract ids in the instantiation UI.

0.25.0 - 2018-11-22

Added

  • Added the power and square root functions; Math::pow and Math::sqrt to the standard library.

Fixed

  • sic: Fixed a bug in the conversion of values in the TypeScript backend.

  • Fixed broken link to PDF language guide in the HTML language guide.

  • Corrected an error in the UI Actions tab.

0.24.0 - 2018-11-19

Changed

  • sic: It is no longer necessary to wrap contract ids in the Kotlin interface for reports and event application.

  • Changed layout of instantiation screen to handle templates with many arguments in the UI.

Fixed

  • Fixed a bug that caused the Kotlin API client to break when it was initialized with a request timeout.

  • Fixed a bug when serializing durations with jackson.

0.23.0 - 2018-11-07

Changed

  • sic: Event application functions in Kotlin and TypeScript are no longer lower-cased but follow the capitalization of their CSL types.

Fixed

  • Fixed a bug in the TypeScript backend to sic that caused reports that return Pair or Maybe values to fail at runtime.

  • Fixed a bug with event application that would sometimes cause a “variable not found in environment” error.

  • Fixed a bug in the Kotlin backend to sic where the result would not compile when agents were compared.

Removed

  • The “Apply Event as Text” button has been removed from the webapp because it is no longer possible to construct an event value within the syntax of the language.

0.22.0 - 2018-10-10

Added

  • A new instantiation argument which resolves to the id of the instantiated contract has been added.

  • The Visual Studio Code extension now supports projects spanning multiple CSL files (see the plugin’s README for more information).

  • Tutorial section about the tool sic to the language guide.

Fixed

  • Fixed a bug that caused Corda nodes to fail when using lists in events.

Changed

  • Agents in contracts are no longer strings, but are abstract values issued by the ledger. Use the new /agents API to retrieve the available agent values.

  • It is no longer possible to use the special variable events to refer to the events of the contract instance; use getEvents instead.

  • Contracts::getEvents has been renamed to getEvents.

  • It is no longer possible to redeclare top-level value bindings.

  • Contract ids are no longer strings but instead abstract values of the type ContractId that cannot be constructed in syntax.

0.21.0 - 2018-09-21

Added

  • Web UI: Contract ID selector in “Reports” tab.

  • It is now possible to specify a separate peers list for each contract instantiation in the code generated by sic.

Fixed

  • Fixed a bug where the webapp could not apply events containing data with qualified sum types.

  • Fixed a bug in sic that caused empty CSL records to be handled wrong.

0.20.0 - 2018-09-14

Added

  • Lightweight implementation of Corda adapter where the notary is only used to ensure consensus on the ordering of events for contracts and not validity of the sequence of events.

  • Added ISO 8601 compliant syntax for duration literals.

  • Added built-ins and standard library functions for working with durations.

Fixed

  • Cucumber: ContractIDs are replaced in the expected results of Report tests.

  • Fixed a bug in the scoping of event bindings in prefix expressions.

0.19.0 - 2018-08-31

Added

  • TypeScript backend to sic.

  • Upgraded Corda to version 3.2.

  • Upgraded Fabric to version 1.2.

  • Added support for Fabric in deployment-tool.

  • Support for batching in Kotlin-client.

Changed

  • It is now only possible to query Contracts::getEvents on contracts that are instantiated from the same declaration ID as the caller.

  • Updated the formatting and structure of the CSL language guide and reference.

Fixed

  • Fixed a bug where agents represented by variables could be shadowed by bound event names.

  • Fixed a bug in the serialization of contracts.

  • Fixed a bug in sic that caused Kotlin code generated from CSL that used Floats to break.

  • Fixed a bug in sic that caused it to generate invalid code due to keyword name clashes.

  • Fixed a bug in the corda-adapter that could break the client-to-node communication under high load

0.18.0 - 2018-08-13

Added

  • Deployment tool.

  • The code generation tool sic for automatically generating a Kotlin interface for a CSL contract.

Changed

  • Upgraded Corda to version 3.1.

Fixed

  • Fixed a bug that crashed the UI if the residual contract could not be computed.

  • Fixed a bug where lists of events could not be converted from the internal to the external representation in some cases (like List::append events events).

  • Fixed a bug in the web UI where events could not be applied as raw text.

0.17.0 - 2018-06-25

Added

  • The API methods /contracts and /contracts/{id} now return the instantiation time of the contract.

  • The standard library now has a Maybe::bind function. See the documentation for details.

  • A built-in function error : RuntimeError -> a has been added.

Changed

  • The API methods /contracts/report and /contracts/{id}/report now accept an optional list of Values that can be used as arguments for reports that take parameters.

Removed

  • The REST API clients have been moved to GitHub.

Fixed

  • A bug which caused the type checker to refuse references to previously declared templates from locally defined templates has been fixed.

  • A bug where the simplifier would cause run-time errors to disappear has been fixed.

  • Corrected a bug where server side errors could break the UI.

0.16.0 - 2018-06-05

Changed

  • The syntax for declaring contracts, templates and values has been changed. Recursive contract templates now have to be explicitly marked as so, and mutually recursive templates must be declared together. See the language guide for more information.

  • The Add event button has been removed from the Viewer menu as it duplicates the functionality on Actions. Events can be added as raw text from Actions now.

  • Removed the API method /parse-value that was equivalent to /report in taking an expression as string and returning a Value.

  • Renamed the /contract/{id}/simplified endpoint to /contract/{id}/src endpoint and added an optional parameter simplified such that /contract/{id}/src?simplified=true returns the simplified residual contract and /contract/{id}/src returns the non-simplified residual contract.

Fixed

  • Fixed an issue in the (Kotlin) implementation of apply that could result in a crash from a stack overflow.

0.15.0 - 2018-05-28

Added

  • The UI now displays the current version number.

Changed

  • Performance of the CSL parser has been improved.

  • Performance of report and expression evaluation has been improved.

  • The endpoints /check, /check-expression, and /parse-value will now run type check on successfully parsed declaration parts even if there is a parse error later.

Fixed

  • Fixed a bug where the Visual Studio Code plugin was not in contact with the parser and type checker.

0.14.0 - 2018-05-17

Added

  • The standard library now has List::isEmpty function.

Fixed

  • The in-memory ledger and database-backed ledger backend now correctly handle tagged event application.

Changed

  • The Node.JS and web REST clients now support optional tags for applyEvent.

  • Performance of the /checkEvent endpoint has been improved.

0.13.0 - 2018-05-14

Added

  • Events are now type checked before being applied to contracts.

  • The web editor now supports comment toggling with Cmd-/ or Ctrl-/.

  • Standard library function DateTime::dayOfWeek that gives the day of week (DateTime::DayOfWeek) for a DateTime.

0.12.0 - 2018-05-07

Added

  • The ontology for a CSL program now includes sum types in addition to record types.

  • New event input form in “Actions” tab.

  • New database-backed ledger backend with support for H2 and SQLite.

  • Node.js REST client.

  • Added new endpoints to submit contracts and events in batches for faster execution

  • Convenience function to JavaScript SDK for handling Value objects as JSON data.

Fixed

  • Fixed a bug where applying many events to a contract could cause an exception.

  • Fixed some bugs where a couple of endpoints in the API client NPM package did not work.

  • Fixed bug where contract instantiation would result in an illegal contract due to a bug in the implementation of scoping.

Changed

  • Moved endpoint to simulate events, and added the possibility to simulate events across multiple contracts.

  • When running reports, the optional parameter for declaration id is now an optional path parameter. The client SDK has been updated to reflect this.

0.11.0 - 2018-04-24

Added

  • Shorthand syntax for DateTime literals in CSL. The following all denote the same point in time: #2018#, #2018-01#, #2018-01-01#, #2018-01-01T00#, #2018-01-01T00:00#, #2018-01-01T00:00:00#, and #2018-01-01T00:00:00Z#.

  • Added “guardedness check” to ensure that contracts do not contain infinite recursion.

  • Support for unary minus.

Fixed

  • Fixed a bug where the UI’s pretty printing of DateTime values were not syntactically valid.

  • Fixed bug where contract instances in the web app AST view were not simplified.

  • Fixed bug where the order of arguments to constructors were reversed when converting from value to expression.

0.10.0 - 2018-04-18

Added

  • Contract abbreviations can now be defined in let blocks and top-level definitions.

  • Contract templates with no contract parameters can now also be defined using the template keyword.

  • CSL extension to Visual Studio Code.

  • Node.js package with an API client.

  • Contract examples are now available in the UI.

  • Report examples in the language guide.

  • Added type checking to contract instantiation, preventing you from passing illegal arguments to contracts.

  • Added the possibility to run a simulation of event application without modifying a contract on the ledger.

Fixed

  • Fixed an issue where contract names and module names could be in conflict, thus causing bugs when applying events to those contracts.

  • Changed the parser such that ranges of tokens don’t include trailing whitespace.

Changed

  • It is no longer possible to do comparison of strings like "a" > "b".

  • Locations in error messages have been improved to be more specific.

0.9.0 - 2018-03-21

Added

  • Standard library extended with Int::toString function.

Changed

  • The /contracts/{id}/next-events and /contracts/{id}/tree endpoints will no longer surround agent matcher with < and >.

Fixed

  • Fixed an issue where result values from report evaluation were not rendered correctly.

  • Fixed an issue where cross origin resource sharing (CORS) headers were not included in the webservice HTTP responses.

  • Local contract and template declarations would not overwrite global ones in the type checker.

0.8.0 - 2018-03-13

Added

  • The UI now has a link to the OpenAPI (Swagger) documentation for the webservice API.

  • Added GET /declarations/{id} endpoint to the webservice API.

  • Reports and values are now type checked.

  • Evaluation of reports independently of specific contract instances:

    • Added POST /contracts/report endpoint to the webservice API for evaluating reports.

    • “Reports” tab in UI has been updated with option to evaluate reports independently.

  • The standard library now has String::append function.

Changed

  • The webservice API has been refactored and documented:

    • Input/output models have new names, e.g. Declaration and Contract instead of NamedCSL and NamedContract.

    • Contracts can only be instantiated with a declaration ID - not with a CSL string.

    • Contract AST are now retrieved through /contracts/{id}/tree.

    • Next events for contracts are now retrieved through /contracts/{id}/next-events.

    • Endpoints now return HTTP codes 4XX when the input is invalid, e.g., 404 for invalid ID’s, 400 for failed type checking, etc.

    • Input bodies are always objects with named fields.

    • /templates endpoints are now /declarations endpoints.

    • /peers and /ledgerInfo have been merged to /node-info.

    • /csl is now /csl/check.

    • /parseReport is now /csl/check-expression.

    • /value is now /csl/parse-value.

    • /{id}/ontology is now /declarations/{id}/ontology.

    • /contract/{id}/report is now /contracts/{id}/report.

    • OpenAPI (Swagger) documentation has been updated with examples and data models.

    • Qualified named for Records, Lists, types are now sent as structured objects instead of strings, e.g. A::a is now {qualifier: ["A"], name: "a"}.

  • The UI now refers to “declarations” instead of “templates”.

Removed

  • The DELETE endpoints /contracts/{id} and /templates/{id} have been removed from the webservice API.

Fixed

  • Fixed an issue where a contract could not be instantiated if a type with the same name is present.

  • Fixed an encoding issue where some characters could not be used in CSL.

  • Fixed a bug in the type checker where sum type constructors inside modules where globally scoped.

0.7.1 - 2018-03-12

Fixed

  • Fixed concurrency issue in InMemory-ledger.

0.7.0 - 2018-03-06

Added

  • Structural equality relations for lists of base types added to standard library.

  • List shorthand: [1,2,3] is shorthand for Cons 1 (Cons 2 (Cons 3 Nil)).

  • Upcast annotation (:>) for records, telling the type checker to consider a record expression as a super record, e.g. DeliveryEvent {...} :> Event.

Fixed

  • Fixed issues in relation to expansion of templates. template[c] Foo() = (<*> E then success) then c would not work as expected.

  • Fixed issue where ((<*> E then success) or success) then C would accept C and become ((<*> E then success) or success) then success but it should have become simply success.

0.6.0 - 2018-02-23

Added

  • The UI now has a link to the language guide.

  • The UI now has a link to the change log (this document).

  • The language guide now contains a grammar for CSL.

Changed

  • Upgraded Corda to v2.0.0.

  • Changed keyword fail to failure for consistency with success. Both success and failure are nouns.

  • Prefix contracts do not include the then keyword. Therefore, the following two are now equivalent <*> E and <*> E then success.

Fixed

  • Fix a serialization issue between FabricLedgerService and chaincode.

  • Removed argument field names at instantiation.

0.5.0 - 2018-02-13

Added

  • Support for the submission of event subtypes from the web UI if the contract’s ontology specifies them.

  • Added new ledger service FabricLedgerService that supports CSL runtime on Hyperledger Fabric.

  • Serve language-guide with webservice (http://webservice:8080/docs/guide.html).

  • Parse and type errors are now highlighted in the web UI.

Changed

  • The Order type in the standard library has been renamed to Ordering.

Fixed

  • Significantly improve the speed with which contract source code is printed (roughly ~100x). This should improve the performance of cucumber tests.

  • Fix a bug that made it impossible to instantiate contracts with DateTime parameters in the web UI.

0.4.0 - 2018-02-06

Changed

  • Updated the CSL standard library to version 0.2, with the following changes:

    • Renamed module Time to DateTime, and Time::TimeComponents to DateTime::Components.

    • Added DateTime::addDays.

    • Added general combinators: id, const, flip.

    • Added Pair, and projection functions fst, snd.

    • Added Maybe with functions maybe, fromMaybe, Maybe::map, Maybe::isDefined, Maybe::any, Maybe::all.

    • Added compareInt, compareFloat, and compareDateTime.

    • Added the following functions to List module: head, headOrDefault, tail, length, map, mapMaybe, filter, zipWith, any, all, first, last, append, concat, reverse, take, drop.

    • Added documentation.

    • Indentation and formatting.

  • The value parser now uses CSL2 syntax. This means events should be entered in CSL2 syntax with uppercase constructors e.g. True False Nil and Cons.

Removed

  • The CSL1 language level.

Fixed

  • Fix a bug that caused the ontology viewer to not be shown when a record type explicitly specified Record as its parent.

0.3.0 - 2018-02-05

Added

  • In com.deondigital.api a ConstructorValue is now available to create and read CSL-constructors applied to argument values.

  • Record subtyping, so that a record subtype can match the type pattern of its supertype, and an event subtype can be applied to a contract accepting its supertype.

Fixed

  • The reports tab would report an error when the result of a report contained any constructor which was not True, False, Nil or Cons.