This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// monophormism from Ascent to PyReason | |
use ascent::*; | |
use ordered_float::OrderedFloat; | |
use std::cmp::Ordering; | |
// real number intervel | |
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | |
pub struct Intervel(OrderedFloat<f32>, OrderedFloat<f32>); | |
// the intervel order in PyReason is reversed: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::rc::Rc; | |
use ascent::{ascent, Lattice}; | |
#[derive(Debug, Clone, PartialEq, Eq, Hash)] | |
struct DepLattice<T> { | |
val: T, | |
ord_num: usize, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The core of parallel GeMM (General Matrix Multiply) involves dividing the | |
* matrices into smaller tiles. | |
* | |
* Matrix A has dimensions M x K and matrix B has dimensions K x N. We can | |
* choose smaller tiles for both A and B: | |
* - tileA has dimensions blockM x blockK | |
* - tileB has dimensions blockK x blockN | |
* | |
* The matrix A can be divided into (M / blockM) x (N / blockK) tiles, and |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use ascent::ascent_run; | |
// Given a string containing just the characters '(' and ')', return the length of the longest valid (well-formed) parentheses | |
// substring | |
// . | |
// Example 1: | |
// Input: s = "(()" | |
// Output: 2 | |
// Explanation: The longest valid parentheses substring is "()". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use ascent::*; | |
use rayon::{iter::Empty, vec}; | |
use std::{borrow::Borrow, collections::{BTreeMap, BTreeSet}, rc::Rc}; | |
type item_type = i32; | |
#[derive(Debug, Clone, PartialEq, Eq, Hash)] | |
enum Bag { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use ascent::ascent; | |
use std::rc::Rc; | |
#[derive(Debug, Clone, PartialEq, Eq, Hash)] | |
enum PathProv { | |
Null, | |
Cons(i32, Rc<PathProv>), | |
} | |
use crate::PathProv::{Null, Cons}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(edb ?(isMainClass C)) | |
(edb ?(isSubClass Y)) | |
(edb ?(subProp R S)) | |
(edb ?(subPropChain S1 S2 S)) | |
(edb ?(ali A B)) | |
(edb ?(exists Y R C)) | |
(edb ?(conj Y D1 D2)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use rand::{Rng, RngCore}; | |
use std::fs::read_to_string; | |
use std::io::Write; | |
use ascent::aggregators::{max, min}; | |
use ascent::lattice::Dual; | |
use ascent::*; | |
ascent_par! { | |
#![measure_rule_times] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// DDISASM_DEBUG_DIR=/workspace/facts/capstone/ DDISASM_GTIRB_MODULE_NAME=libcapstone.so.5 /usr/bin/time -v /workspace/ddisasm/extacted.bin -j 16 -F /workspace/facts/capstone/disassembly/ -D /workspace/facts/debug/ | |
.type input_reg <: symbol | |
.type reg_nullable <: symbol | |
.type register <: reg_nullable | |
.type address <: unsigned | |
.type operand_code <: unsigned | |
.type operand_index <: unsigned | |
.type limit_type <: symbol |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; let's write map in slog! | |
; we need a global relation map which is similar to list | |
; it has declartion: (map key value map-id) | |
; base case: empty map | |
(foo1 (empty-map 0)) | |
; recursive case: map with one more key-value pair | |
(foo2 (map 2 4 (map 1 2 (empty-map 0)))) |
NewerOlder