Giter Club home page Giter Club logo

creduce_julia's People

Contributors

davidanthoff avatar maleadt avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

creduce_julia's Issues

Write a `julia_delta` using JuliaSyntax

creduce uses clang_delta https://github.com/csmith-project/creduce/tree/master/clang_delta

Which performs C/C++ aware semantic transformations.

Ideas for impactful prunings.

  • export/import statements
  • include (and subsequent file deletions)
  • method body / struct body
  • method to generic function
  • Static macro expansions
  • docstring/comments

The "annoying" bit here is that both JuliaSyntax and CSTParsers don't support a proper rewrite functionality.
I think the closest is in JuliaSyntax to rewrite spans with whitespace characters?

cc: @c42f

Make environment rewriting more robust

When testing changes to a devved packages, the scripts here copy the depot into a temporary location, but need to patch up the environment's Manifest.toml to replace references to that package to the changed version:

creduce_julia/activate

Lines 20 to 23 in 1a49d45

if [[ -d depot/environments ]]; then
# rewrite manifests to point dev'ed packages to our new depot
sed -i "s#path = \".*/depot/dev#path = \"$(pwd)/depot/dev#g" depot/environments/*/Manifest.toml
fi

That's fragile, as it's possible to craft an environment where devved packages contain, e.g. a relative path.

`EPOCHSECONDS` not defined in old bash

START=$EPOCHSECONDS

$ ./run 
./run: line 31: EPOCHSECONDS: unbound variable
$ bash --version
GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Could use date +%s instead?

Use CodeCoverage as a guide

For very large projects a good starting point would be to take code-coverage of the reducer into consideration.

PATH=$HOME/builds/julia-asserts:$PATH ./julia --code-coverage=@$(pwd)/depot/dev main.jl

One can use CoverageTools.jl to parse the results, but we would need to use JuliaSyntax or CSTParser to understand
the coverage better and only delete method bodies that are fully unreached and not exports, types, and others.

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.