Ciao - Assertions and their Use

Lobsters Hottest Tools

Summary

This documentation describes the assertion language in the Ciao Prolog system, which allows annotating code with type and instantiation mode declarations for debugging, testing, optimization, and autodocumentation.

<p><a href="https://lobste.rs/s/qz0gu0/ciao_assertions_their_use">Comments</a></p>
Original Article
View Cached Full Text

Cached at: 06/05/26, 05:05 AM

# PART III - Assertions and their use — The Ciao System v1.25 Source: [https://ciao-lang.org/ciao/build/doc/ciao.html/AssrtLang.html](https://ciao-lang.org/ciao/build/doc/ciao.html/AssrtLang.html) **Author\(s\):**[The Ciao Development Team](https://ciao-lang.org/ciao/build/doc/ciao.html/ciaosearch.html#The%20Ciao%20Development%20Team)\. Ciao allows*annotating*the program code with*assertions*\. Such assertions include[type](https://ciao-lang.org/ciao/build/doc/ciao.html/ciaosearch.html#type)and[instantiation mode](https://ciao-lang.org/ciao/build/doc/ciao.html/ciaosearch.html#instantiation%20mode)declarations, but also more general properties as well as comments for*autodocumentation*in the*literate programming*style\. These assertions document predicates \(and modules and whole applications\) and can be used by the Ciao tools while debugging, testing, and optimizing the program or library, and by the Ciao documenter to build program or library reference manuals\. ## Subparts - [The Ciao assertion language](https://ciao-lang.org/ciao/build/doc/ciao.html/assertions_doc.html) - [Declaring regular types](https://ciao-lang.org/ciao/build/doc/ciao.html/regtypes_doc.html) - [Basic data types and properties](https://ciao-lang.org/ciao/build/doc/ciao.html/basic_props.html) - [Properties which are native to analyzers](https://ciao-lang.org/ciao/build/doc/ciao.html/native_props.html) - [Classical Prolog modes](https://ciao-lang.org/ciao/build/doc/ciao.html/modes_doc.html) - [ISO\-Prolog modes](https://ciao-lang.org/ciao/build/doc/ciao.html/isomodes_doc.html) - [Some basic Prolog modes](https://ciao-lang.org/ciao/build/doc/ciao.html/basicmodes_doc.html) - [Meta\-properties](https://ciao-lang.org/ciao/build/doc/ciao.html/meta_props.html) - [Documentation comments](https://ciao-lang.org/ciao/build/doc/ciao.html/doccomments_doc.html) - [Run\-time checking of assertions](https://ciao-lang.org/ciao/build/doc/ciao.html/rtchecks_doc.html) - [Unit testing](https://ciao-lang.org/ciao/build/doc/ciao.html/unittest.html) - [Using assertions for preprocessing programs](https://ciao-lang.org/ciao/build/doc/ciao.html/debugging_in_ciaopp.html)

Similar Articles

You Must Fix Your Asserts

Lobsters Hottest

The article argues that disabling asserts in production is a bad practice, using Zig's assert mechanism as an example to illustrate the benefits of keeping asserts enabled for catching programming errors even in production builds.

Confidence-Aware Alignment Makes Reasoning LLMs More Reliable

arXiv cs.AI

This paper introduces CASPO, a framework for aligning token-level confidence with step-wise logical correctness in large reasoning models using iterative Direct Preference Optimization. It also proposes Confidence-aware Thought (CaT) for dynamically pruning uncertain reasoning branches during inference to improve reliability and efficiency.

Prolog Coding Horror

Hacker News Top

A guide to common pitfalls in Prolog programming, emphasizing the use of pure and declarative constructs over impure ones like cuts, global state, and low-level I/O.