GithubHelp home page GithubHelp logo

mrshoenel / cameleer Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 476 KB

Cameleer is a tool that facilitates rich orchestration and task definitions to get jobs done.

License: MIT License

JavaScript 100.00%

cameleer's People

Contributors

mrshoenel avatar

Watchers

 avatar  avatar

cameleer's Issues

Primitive for producing a value of specified type nondeterministically

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.)

Update

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
  ...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.