mrshoenel / cameleer Goto Github PK
View Code? Open in Web Editor NEWCameleer is a tool that facilitates rich orchestration and task definitions to get jobs done.
License: MIT License
Cameleer is a tool that facilitates rich orchestration and task definitions to get jobs done.
License: MIT License
Hi!
Is there a way (or is there any plan in the future) to extend cameleer with a primitive that produces a value of a specified type nondeterministically?
WhyML has a primitive any
.
http://why3.lri.fr/doc/syntaxref.html#the-any-expression
If we write any bool
, it evaluates to a boolean value nondeterministically. I wonder whether there is a way to do the same thing in cameleer. Simulating any bool
with a function that randomly returns true
or false
using Random.bool
causes a termination issue. (I'll write a concrete example later.)
Sorry, the above description that a termination issue arises was not accurate. The true problem seems to be that we don't know how to call Random.bool
or, more in general, library functions in Cameleer. If we can call Random.bool
, then we can successfully simulate any
as follows.
type t = A | B | C of t * t
(* Simulating "any t" in WhyML *)
let rec any_t (n:int) =
if n < 0 then
A
else if Random.bool () then
B
else
C(any_t (n-1), any_t (n-1))
(*@ variant n *)
...
let f () =
let t = any_rep (Random.int ()) in
...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.