![]() |
YAP 7.1.0
|
This library aims at facilitating test generation in a logic program, namely when interfacing to foreign code.
This library aims at facilitating test generation in a logic program, namely when interfacing to foreign code.
It introduces the following specs:
maxlength=MaxLength
and the original program is extended to support an optional parameter Length, eg:
vector( Type, Length, V ) :- alloc( Type, Length, MaxLength, V )
will become
vector( Type, Length, V, MaxLength ) :- alloc( Type, Length, MaxLength, V )
You can write type tests and ISO-like tests offline
It allows default code for variables In the previous code, the initializer MaxLength = 1024 would result in two clauses:
vector( Type, Length, V, MaxLength ) :- alloc( Type, Length, MaxLength, V ) vector( Type, Length, V ) :- alloc( Type, Length, 1024, V )
See myddas.yap for a few examples