All Downloads are FREE. Search and download functionalities are using the official Maven repository.

models.book.chapter5.lists.als Maven / Gradle / Ivy

module chapter5/lists ---- page 157

some sig Element {}

abstract sig List {}
one sig EmptyList extends List {}
sig NonEmptyList extends List {
	element: Element,
	rest: List
	}

fact ListGenerator {
	all list: List, e: Element |
		some list': List | list'.rest = list and list'.element = e
	}

assert FalseAssertion {
	all list: List | list != list
	}

// This check finds no counterexample since
// the only possible counterexamples are infinite.
check FalseAssertion




© 2015 - 2025 Weber Informatics LLC | Privacy Policy