Commit Graph

93 Commits

Author SHA1 Message Date
Matthew Yacavone
fe62c14735 Merge branch 'master' into rpc/more-examples 2021-04-27 15:55:43 -04:00
Matthew Yacavone
e431ce9f14 add all submodules to __all__ 2021-04-23 18:54:22 -04:00
Matthew Yacavone
d5d0c1d2ea restore old __init__.py imports, in case anyone uses them 2021-04-23 15:44:51 -04:00
Matthew Yacavone
e4345a89c4 move contents of __init__.py to commands.py, connection.py 2021-04-23 15:29:32 -04:00
Matthew Yacavone
90baa856f2 whoops, added back result() to test-cryptol-remote-api.py 2021-04-23 14:54:36 -04:00
Matthew Yacavone
9572ddbbf4 update evaluate_expression call in test-cryptol-remote-api.py 2021-04-23 14:02:29 -04:00
Andrew Kent
9995513098
chore: ensure run_rpc_tests.sh uses up-to-date server binaries (#1174) 2021-04-22 16:16:28 -07:00
Matthew Yacavone
8528e1dbf3 Merge branch 'master' into rpc/more-examples 2021-04-22 15:00:49 -04:00
Matthew Yacavone
bc03778420 add test_EvenMansour 2021-04-22 14:55:52 -04:00
Andrew Kent
966b3431c1
feat(rpc): safe for python api (#1168)
* feat(rpc): safe for python api

* refactor: use enum for smt query type

* Update cryptol-remote-api/python/cryptol/__init__.py

Co-authored-by: Ryan Scott <ryan.gl.scott@gmail.com>

* Update cryptol-remote-api/python/cryptol/__init__.py

Co-authored-by: Ryan Scott <ryan.gl.scott@gmail.com>

Co-authored-by: Ryan Scott <ryan.gl.scott@gmail.com>
2021-04-22 11:27:31 -07:00
Matthew Yacavone
57778d18e2 Merge branch 'master' into rpc/more-examples 2021-04-22 13:01:10 -04:00
Andrew Kent
dbf9d63750
Merge pull request #1164 from GaloisInc/rpc/chore/remove-dead-code
chore: remove dead rpc code for change directory
2021-04-19 14:03:52 -07:00
Rob Dockins
a279e78d53 Expose modPathSplit and defaultSolverConfig for downstream use. 2021-04-16 12:12:38 -07:00
Andrew Kent
47f1428279 chore: remove dead rpc code for change directory 2021-04-15 16:11:04 -07:00
Matthew Yacavone
ff26feb83c add test_DES, fix string literals in test_SHA256 2021-04-15 13:38:13 -04:00
Matthew Yacavone
1a34e05361 Merge branch 'master' into rpc/more-examples 2021-04-15 12:57:43 -04:00
Andrew Kent
34749601e6
Merge pull request #1159 from GaloisInc/rpc/feat/check
feat(rpc): check, AES example/test
2021-04-14 14:53:12 -07:00
Matthew Yacavone
ec2a23abf1 add SHA256 test, add from_cryptol_arg to CryptolEvalExpr 2021-04-14 17:33:06 -04:00
Rob Dockins
6853ba0330 Don't reexport the SeqMap API 2021-04-13 10:27:17 -07:00
Rob Dockins
e7df405732 Fix import in cryptol-remote-api 2021-04-13 10:27:17 -07:00
Rob Dockins
a112ed8cf7 Update cryptol-remote-api 2021-04-13 10:27:17 -07:00
Andrew Kent
4ab4c687e7 feat(rpc): check, AES example/test 2021-04-08 14:56:52 -07:00
Iavor Diatchki
501f884353 Merge branch 'master' into nested-modules 2021-04-01 15:23:02 -07:00
Andrew Kent
5dd9be0e44 feat(rpc): extend search path, remove cd 2021-04-01 14:41:40 -07:00
Andrew Kent
f1e753b67f update python package for PyPI 2021-03-29 13:45:36 -07:00
robdockins
b4e0a7fbe3
Merge pull request #1128 from GaloisInc/persist-solver2
Persist solver, part 2
2021-03-25 09:53:10 -07:00
Rob Dockins
6626c4d33e Hoist the Solver instance into the SolverState for the remote API.
Now, a single solver instance is used for the entire server.

Questions/TODO:

1. Will this cause problems with concurrent clients?
2. There doesn't seem to be any way to do cleanup actions when
the server is shut down, so the solver will not be shut down
gracefully.  Is this a problem?
2021-03-23 15:31:45 -07:00
Lisanna Dettwyler
f021990eba
Prep CI for upcoming release (#1123)
- Container images are now published to ghcr.io rather than docker hub (closes #1110):
  - https://github.com/orgs/GaloisInc/packages/container/package/cryptol
  - https://github.com/orgs/GaloisInc/packages/container/package/cryptol-remote-api
- Docker builds for all images are cached against ghcr.io (doesn't provide incremental builds, but it still helps a lot).
  - https://github.com/orgs/GaloisInc/packages/container/package/cache-cryptol
  - https://github.com/orgs/GaloisInc/packages/container/package/cache-cryptol-remote-api
- "Portable" variant of cryptol-remote-api is now built and tested to the same degree as the non-portable one
- Normalized CI workflows to [`.github/workflows/ci.yml`](https://github.com/GaloisInc/cryptol/blob/lisanna/docker-publishing/.github/workflows/ci.yml) (closes #1115)
- Pre-merge and release build configurations are now more or less the same, so release process remains validated (closes #1114, closes #1116)
- Matrix configs for each job are visible at high-level views of the workflow
- Always upload workflow artifacts, use sensible retention periods for publish vs. non-publish
- `cryptol-eval-server` included in cryptol-remote-api container image (closes #1112)
- Pathclearing for static linking (#1113)
2021-03-23 15:24:48 -07:00
dependabot[bot]
e546dff60a
Bump jinja2 from 2.11.2 to 2.11.3 in /cryptol-remote-api/python (#1124)
Bumps [jinja2](https://github.com/pallets/jinja) from 2.11.2 to 2.11.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/master/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/2.11.2...2.11.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-23 14:37:23 -07:00
Andrew Kent
26c24a1b94 feat: reset_server option for python client/server 2021-03-19 13:20:55 -07:00
Andrew Kent
66d1022d22 chore: squelch some warnings in CryptolServer 2021-03-19 13:20:55 -07:00
Ryan Scott
23c396b1a9 cryptol-remote-api: Upgrade to mypy-0.812
This upgrades `mypy` to version `0.812`. This is primarily motivated by a need
to work around python-poetry/poetry#3094, which currently happens if you try to
include the SAW Python bindings in a `poetry` project as a `develop`
dependency. For the most part, this is a matter of adjusting version bounds.
In a handful of cases, we are able to remove `type: ignore` comments due to
`mypy-0.8` being smarter than `mypy-0.7`.
2021-03-17 14:28:42 -04:00
Ryan Scott
d9b60bea63 Specify setuptools>=40.8.0
I needed this to install the bindings with `pip`, which doesn't know how to
fall back to `setuptools` properly without declaring this.
2021-03-17 14:28:42 -04:00
Ryan Scott
6c785c07ee Make cryptol-remote-api mypy-clean
A handful of tweaks needed to make `cryptol-remote-api`'s Python code
`mypy`-clean:

* `__del__` needs an explicit `-> None` return type.
* `BitVector` has no type annotations, so `type: ignore` it.

While I was in town, I:

* Made sure that running `mypy` is a part of CI.
* Added a `pyproject.toml` file for running Python-related commands with
  `poetry`, much like we have in `saw-remote-api`.
2021-03-17 12:54:18 -04:00
Ryan Scott
889958acca Add Python-centric .gitignore file for cryptol-remote-api/python directory
This is useful for ensuring that autogenerated `__pycache__` directories
resulting from running the tests do not pollute the `git` tree.
2021-03-16 17:02:29 -04:00
Iavor Diatchki
34b1d87df3 Implementation of nested modules.
* Limitations:
    Does not work in combination parameterized modules, as I am
    about to redo how that works.

  * General refeactorings:
    * Namespaces:
      - We have an explicit type for namespaces, see `Cryptol.Util.Ident`
      - Display environments should now be aware of the namespace of the
        name being displayed.

    * Renamer:
      - Factor out the renamer monad and error type into separate modules
      - All name resultion is done through a single function `resolveName`
      - The renamer now computes the dependencies between declarations,
         orders things in dependency order, and checks for bad recursion.

    * Typechecker: Redo checking of declarations (both top-level and local).
      Previously we used a sort of CPS to add things in scope.   Now we use
      a state monad and add things to the state.  We assume that the renamer
      has been run, which means that declarations are ordered in dependency
      order, and things have unique name, so we don't need to worry about
      scoping too much.

  * Change specific to nested modules:
    - We have a new namespace for module names
    - The interface file of a module contains the interfaces for nested modules
    - Most of the changes related to nested modules in the renamer are
      in `ModuleSystem.NamingEnv` and `ModuleSystem.Rename`
        - There is some trickiness when resolving module names when importing
          submodules (seed `processOpen` and `openLoop`)
    - There are some changes to the representation of modules in the typechecked
      syntax, in particular:
        - During type-checking we "flatten" nested module declarations into
          a single big declaration.  Hopefully, this means that passes after
          the type checker don't need to worry about nested modules
        - There is a new field containing the interfaces of the nested modules,
          this is needed so that when we import the module we know we have the
          nested structure
        - Declarations in functor/parameterzied modules do not appear in the
          flattened list of declarations.  Instead thouse modules are collected
          in a separate field, and the plan is that they would be used from
          there when we implmenet functor instantiation.
2021-03-12 09:55:56 -08:00
LisannaAtGalois
8a0a0094ae
Fix nightly builds (#1101)
* Restore files used in nightly
* fix helm test to use renamed argo
* point test to correct python location
* use python 3.9 for :=
2021-03-10 08:04:31 -08:00
Andrew Kent
9943b5ce0c test: test cryptol-remote-api docker image alongside other builds 2021-03-04 14:38:47 -08:00
Andrew Kent
a95ea3b52c feat: bump argo submodule, test server can serve many requests 2021-03-02 16:32:44 -08:00
Andrew Kent
af33f2e4a9 doc: Python client README content 2021-03-02 08:26:51 -08:00
Andrew Kent
307c18f1f4 feat: initial co-located python client 2021-03-01 15:56:28 -08:00
Andrew Kent
27b8718891 Merge branch 'main' of ../galois-py-toolkit into remote-server-ci 2021-03-01 13:19:05 -08:00
Andrew Kent
b2562b3d27 bump argo, minor rpc tweaks 2021-03-01 13:19:00 -08:00
Andrew Kent
2c97f85c0e chore: grab cryptol python code for move 2021-03-01 13:16:45 -08:00
Andrew Kent
665b1c7b5d
chore: make problematic warnings error for cryptol-remote-api (#1088) 2021-02-24 14:14:07 -08:00
Andrew Kent
31ddad6ccc
change remote Dockerfile's cwd for server (#1082)
* change remote Dockerfile's cwd for server

* Update cryptol-remote-api/Dockerfile

Co-authored-by: LisannaAtGalois <72424138+LisannaAtGalois@users.noreply.github.com>

Co-authored-by: LisannaAtGalois <72424138+LisannaAtGalois@users.noreply.github.com>
2021-02-16 13:32:11 -08:00
robdockins
538b6c4ff5
Merge pull request #1073 from GaloisInc/standardize-set
Rename the runtime-settable options to use a consistent style
2021-02-16 10:42:01 -08:00
Rob Dockins
d6fd9ee983 Update eval server 2021-02-11 18:00:49 -08:00
Rob Dockins
0abde1e55e Update option names in documentation 2021-02-11 16:27:04 -08:00
LisannaAtGalois
bcc7612b76
Init ghcr.io/galoisinc/cryptol-remote-api:nightly-portable (#1065) 2021-02-10 13:16:35 -08:00