Giter Club home page Giter Club logo

daphne's People

Contributors

alexander-mead avatar dependabot[bot] avatar whilo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

daphne's Issues

Problems generating python-class

Trying to install daphne and running into issues with the python-class generating options. If I try

lein run graph -i programs/arithmetic_circuit.daphne -o output.json

or

lein run desugar -i programs/arithmetic_circuit.daphne -o output.json

both work, and produce the correct output, but if I try

pipenv run lein run python-class -i programs/arithmetic_circuit.daphne -o autogen_arithmetic_circuit.py

I get autogen_arithmetic_circuit.py created, but with only "" in the file. If I try:

lein run python-class -i programs/convolution.daphne -o autogen_convolution.py

I get the error:

Syntax error (NullPointerException) compiling at (/private/var/folders/fr/c2m_v4ss6kjcbgzbqfr_z5fw0000gn/T/form-init14751265169047276845.clj:1:126).
Cannot invoke "java.util.Map$Entry.getValue()" because "e" is null

Full report at:
/var/folders/fr/c2m_v4ss6kjcbgzbqfr_z5fw0000gn/T/clojure-14375094718594195756.edn

I worry that I might be doing something pretty basic wrong...

hash-map differences between graph and desugared output

If I have a FOPPL program containing a hash-map, when I desugar it I get:

["hash-map", 1, 3.2, 6, 2.,]

but when I convert to a graph I get:

["hash-map", [1, 3.2], [6, 2]]

with the difference being the internal lists in the graph case. This difference means that I have to write two slightly different versions of an interpreter for the two cases. If I don't, the internal lists in the graph are identified as expressions (e.g., operate '1' on '3.2') and my interpreter crashes. I can hack my way through this, but maybe the hash-maps should be changed to be identical (and equal to the desugared case)?

Problems with python install

I am trying to install using pipenv and the requirements.txt file. However, I can't seem to be able to get the older versions of torch (1.4.0) or torchvision (0.5.0). I get:

ERROR: No matching distribution found for torch==1.4.0
ERROR: No matching distribution found for torchvision==0.5.0

This might relate to issue #2...

Different results for hash-map

Hi.

The package's result when you call it with desugar or graph is different when you have a hash-map.

Here are the results:

Input: (put (hash-map 6 5.3 1 3.2) 6 2)
Output of daphne(['desugar', '-i', test.daphne']): [['put', ['hash-map', 6, 5.3, 1, 3.2], 6, 2]]
Output of daphne(['graph','-i','test.daphne']): [{}, {'V': [], 'A': {}, 'P': {}, 'Y': {}}, ['hash-map', [1, 3.2], [6, 2]]]

So actually in the first case we have a list of 'hash-map', 6, 5.3, 1, 3.2], 6, 2, but in the second case we have a list of 'hash-map', [1, 3.2], [6, 2]

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.